Skip to content

Commit 9e0842c

Browse files
Grid fixes (#3067)
* Changed Grid Editor to use wx.Panel * Restore fix open dir for wxpython 4.3 (#3064) * Fix scrolling bars in Grid Editor * Development version 2.2.5dev11
1 parent 8145253 commit 9e0842c

8 files changed

Lines changed: 25 additions & 15 deletions

File tree

CHANGELOG.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni
99
== https://github.com/robotframework/RIDE[Unreleased]
1010

1111
=== Fixed
12+
- Fixed extra scrolling bars in Grid Editor.
1213
- Fixed broken directory selection dialog when opening Test Suite directory on first RIDE execution after install.
1314
- Fixed disappering Project Explorer tree elements, after editing directory elements (i.e. variable or keyword).
1415
- Fixed blank Project Explorer panel when docking. Long time existing issue.

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Likewise, the current version of wxPython, is 4.2.5, but RIDE is known to work w
4646

4747
`pip install -U robotframework-ride`
4848

49-
(3.9 <= python <= 3.14) Install current development version (**2.2.5dev10**) with:
49+
(3.9 <= python <= 3.14) Install current development version (**2.2.5dev11**) with:
5050

5151
`pip install -U https://github.com/robotframework/RIDE/archive/develop.zip`
5252

src/robotide/application/CHANGELOG.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Changelog</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /></head><body><div xml:lang="en" class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id1337">_</a>Changelog</h2></div></div><hr /></div><p>All notable changes to this project will be documented in this file.</p><p>The format is based on <a class="ulink" href="http://keepachangelog.com/en/1.0.0/" target="_top">Keep a Changelog</a>
33
and this project adheres to <a class="ulink" href="http://semver.org/spec/v2.0.0.html" target="_top">Semantic Versioning</a>.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_ulink_url_https_github_com_robotframework_ride_unreleased_ulink">_</a>1. <a class="ulink" href="https://github.com/robotframework/RIDE" target="_top">Unreleased</a></h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_fixed">_</a>1.1. Fixed</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
4+
Fixed extra scrolling bars in Grid Editor.
5+
</li><li class="listitem">
46
Fixed broken directory selection dialog when opening Test Suite directory on first RIDE execution after install.
57
</li><li class="listitem">
68
Fixed disappering Project Explorer tree elements, after editing directory elements (i.e. variable or keyword).

src/robotide/application/releasenotes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def set_content(self, html_win, content):
175175
</ul>
176176
<p><strong>New Features and Fixes Highlights</strong></p>
177177
<ul class="simple">
178+
<li>Fixed extra scrolling bars in Grid Editor.</li>
178179
<li>Fixed broken directory selection dialog when opening Test Suite directory on first RIDE execution after install.</li>
179180
<li>Fixed disappering Project Explorer tree elements, after editing directory elements (i.e. variable or keyword).</li>
180181
<li>Fixed blank Project Explorer panel when docking. Long time existing issue.</li>

src/robotide/editor/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ def on_file_deleted(self, message):
194194
self._create_editor()
195195

196196

197-
class _EditorTab(wx.ScrolledWindow):
197+
class _EditorTab(wx.Panel):
198198

199199
def __init__(self, plugin):
200-
wx.ScrolledWindow.__init__(self, plugin.notebook, style=wx.SUNKEN_BORDER)
200+
wx.Panel.__init__(self, parent=plugin.notebook, style=wx.SUNKEN_BORDER)
201201
self.plugin = plugin
202202
self.sizer = wx.BoxSizer(wx.VERTICAL)
203203
self.SetSizer(self.sizer)

src/robotide/editor/editors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def _collabsible_changed(self, event=None):
193193
self.EnableScrolling(True, True)
194194
self.Refresh()
195195
self.Parent.GetSizer().Layout()
196-
self.Parent.EnableScrolling(True, True)
196+
# self.Parent.EnableScrolling(True, True)
197197
self.Parent.Refresh()
198198
if event:
199199
event.Skip()

src/robotide/ui/mainframe.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,25 @@ def _init_ui(self):
296296
"""
297297
# DEBUG: self.leftpanel = wx.Panel(self, name="left_panel", size = (275, 250))
298298
if new_ui: # Only when creating UI we add panes
299-
# Tree is always created here
300-
self.tree = Tree(self, self.actions, self._application.settings)
299+
# Tree is always created here, inside a plain panel. AUI must manage the holder and
300+
# never the Tree itself: docking a floating pane reparents the managed window, and a
301+
# reparented wx.ScrolledWindow (which CustomTreeCtrl is) stops receiving paint events
302+
# on wxGTK, leaving a correctly sized but permanently blank panel. The Files pane uses
303+
# the same idiom (FileExplorer is a wx.Panel wrapping its tree_ctrl).
304+
self.tree_holder = wx.Panel(self)
305+
self.tree = Tree(self.tree_holder, self.actions, self._application.settings)
301306
self.tree.SetMinSize(wx.Size(275, 250))
302307
self.tree.SetFont(wx.Font(self.fontinfo))
303-
# self.leftpanel.Bind(wx.EVT_SIZE, self.tree.OnSize)
304-
# self.aui_mgr.AddPane(self.leftpanel, aui.AuiPaneInfo().Name("left_panel").Caption("left_panel").Left())
308+
tree_sizer = wx.BoxSizer(wx.VERTICAL)
309+
tree_sizer.Add(self.tree, 1, wx.EXPAND)
310+
self.tree_holder.SetSizer(tree_sizer)
311+
self.tree_holder.SetMinSize(wx.Size(275, 250))
305312
# DEBUG: Next was already called from application.py
306313
# print(f"DEBUG: mainframe.py RideFrame NEW UI tree caption {_('Test Suites')}")
307-
self.aui_mgr.AddPane(self.tree,
314+
self.aui_mgr.AddPane(self.tree_holder,
308315
aui.AuiPaneInfo().Name("tree_content").Caption(_('Test Suites')).CloseButton(True)
309316
.LeftDockable(True)
310317
) # DEBUG: remove .CloseButton(False) when restore is fixed
311-
# DEBUG: self.aui_mgr.GetPane(self.tree).DestroyOnClose()
312318
# TreePlugin will manage showing the Tree
313319
self.actions.register_actions(action_info_collection(_menudata, self, data_nt=self._menudata_nt,
314320
container=self.tree))
@@ -502,14 +508,16 @@ def OnFloatDock(self, event):
502508
# panelabel = event.pane.caption
503509
etype = event.GetEventType()
504510
# strs = "Pane %s "%panelabel
511+
# Only the persisted docked/floating state is recorded here. The tree keeps its nodes and
512+
# repaints by itself across the transition, so rebuilding it would just discard the current
513+
# selection; and calling into the AUI manager from these events re-enters its own drag
514+
# handling.
505515
if etype == aui.wxEVT_AUI_PANE_FLOATING:
506516
# strs += "is about to be floated"
507517
if event.pane.name == "file_manager":
508518
self.filemgr.update_tree()
509519
elif event.pane.name == "tree_content":
510520
self._application.treeplugin.set_float_docked(False)
511-
self._application.treeplugin.on_show_tree(None)
512-
self.tree.refresh_view()
513521
# elif etype == aui.wxEVT_AUI_PANE_FLOATED:
514522
# strs += "has been floated"
515523
elif etype == aui.wxEVT_AUI_PANE_DOCKING:
@@ -518,8 +526,6 @@ def OnFloatDock(self, event):
518526
self.filemgr.update_tree()
519527
elif event.pane.name == "tree_content":
520528
self._application.treeplugin.set_float_docked(True)
521-
self._application.treeplugin.on_show_tree(None)
522-
self.tree.refresh_view()
523529
# elif etype == aui.wxEVT_AUI_PANE_DOCKED:
524530
# strs += "has been docked"
525531
# print("DEBUG: " + strs + "\n")

src/robotide/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
#
1616
# Automatically generated by `tasks.py`.
1717

18-
VERSION = 'v2.2.5dev10'
18+
VERSION = 'v2.2.5dev11'
1919

0 commit comments

Comments
 (0)