Skip to content

Commit 4a93663

Browse files
Merge pull request #2920 from HelioGuilherme66/dev_windows
Fix scroll bars in Grid Editor
2 parents 716540e + 60f0e0e commit 4a93663

File tree

9 files changed

+43
-15
lines changed

9 files changed

+43
-15
lines changed

CHANGELOG.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni
1010

1111
=== Fixed
1212

13+
- Fixed multiple scroll bars in Grid Editor when editing Test Cases or Keywords. This caused bad navigation on cells.
1314
- Regression fix from v2.1b1 - Fix wrong item selection, like Test Suite, when doing right-click actions in Project Explorer.
1415
When right clicking over Tree elements, to, for example, expand or select tests, we want to keep the Editor in the same file or position.
1516

README.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ See the https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride
3333

3434
**The current development version is based on 2.1,2, supports Python from 3.8 up to 3.13 (28th January 2025).**
3535

36-
Currently, the unit tests are tested on Python 3.10, 3.11 and 3.13 (but 3.12 is the recommended version).
36+
Currently, the unit tests are tested on Python 3.10, 3.11 and 3.13 (3.13 is the recommended version).
3737
Likewise, the current version of wxPython, is 4.2.2, but RIDE is known to work with 4.0.7 and 4.1.1 versions.
3838

39-
(3.8 <= python <= 3.12) Install current released version (*2.1.2*) with:
39+
(3.8 <= python <= 3.13) Install current released version (*2.1.2*) with:
4040

4141
`pip install -U robotframework-ride`
4242

43-
(3.8 <= python <= 3.13) Install current development version (**2.2dev3**) with:
43+
(3.8 <= python <= 3.13) Install current development version (**2.2dev4**) with:
4444

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

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sonar.projectKey=HelioGuilherme66_RIDE
22
sonar.organization=helioguilherme66
33
sonar.host.url=https://sonarcloud.io
44
sonar.python.version=3.10
5-
sonar.projectVersion=v2.1
5+
sonar.projectVersion=v2.1.2
66
sonar.sources=src/
77
sonar.tests=utest/
88
sonar.exclusions=**/lib/robot/**/*

src/robotide/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def writelines(self, sequence):
136136
""" Override """
137137
pass
138138

139-
if sys.executable.endswith('pythonw.exe'):
139+
if sys.executable.endswith('.exe'):
140140
# In windows, when launching RIDE with pythonw.exe
141141
# sys.stderr and sys.stdout will be None
142142
if sys.stderr is None:

src/robotide/application/CHANGELOG.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
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>
3-
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">
3+
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; ">
4+
<li class="listitem">
5+
Fixed multiple scroll bars in Grid Editor when editing Test Cases or Keywords. This caused bad navigation on cells.
6+
</li>
7+
<li class="listitem">
48
Regression fix from v2.1b1 - Fix wrong item selection, like Test Suite, when doing right-click actions in Project Explorer.
59
When right clicking over Tree elements, to, for example, expand or select tests, we want to keep the Editor in the same file or position.
610
</li></ul></div></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_ulink_url_https_github_com_robotframework_ride_blob_master_doc_releasenotes_ride_2_1_2_rst_2_1_2_ulink_2025_01_28"></a>2. <a class="ulink" href="https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-2.1.2.rst" target="_top">2.1.2</a> - 2025-01-28</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_fixed_2"></a>2.1. Fixed</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">

src/robotide/application/releasenotes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def set_content(self, html_win, content):
151151
<p><a class="reference external" href="https://github.com/robotframework/RIDE/">RIDE (Robot Framework IDE)</a>
152152
{VERSION} is a new release with some enhancements and bug fixes. The reference for valid arguments is
153153
<a class="reference external" href="https://robotframework.org/">Robot Framework</a> previous version, which was 7.1.1
154-
(currently is 7.2). However, internal library code is originally based on version 3.1.2, but adapted for new versions.</p>
154+
(currently is 7.2.2). However, internal library code is originally based on version 3.1.2, but adapted for new versions.</p>
155155
<ul class="simple">
156156
<li>This version supports Python 3.8 up to 3.13.</li>
157157
<li>There are some changes, or known issues:<ul>
@@ -168,6 +168,7 @@ def set_content(self, html_win, content):
168168
</ul>
169169
<p><strong>New Features and Fixes Highlights</strong></p>
170170
<ul class="simple">
171+
<li>Fixed multiple scroll bars in Grid Editor when editing Test Cases or Keywords. This caused bad navigation on cells.</li>
171172
<li>Regression fix from v2.1b1 - Fix wrong item selection, like Test Suite, when doing right-click actions in
172173
Project Explorer.</li>
173174
</ul>
@@ -224,7 +225,7 @@ def set_content(self, html_win, content):
224225
<pre class="literal-block">python -m robotide.postinstall -install</pre>
225226
<p>or</p>
226227
<pre class="literal-block">ride_postinstall.py -install</pre>
227-
<p>RIDE {VERSION} was released on 30/January/2025.</p>
228+
<p>RIDE {VERSION} was released on 12/February/2025.</p>
228229
<!-- <br/>
229230
<h3>May The Fourth Be With You!</h3>
230231
<h3>Celebrate the bank holiday, 10th June, Day of Portugal, Portuguese Communities and Camões!!</h3>

src/robotide/application/updatenotifier.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
import builtins
16+
import os
1617
import re
1718
import subprocess
1819
import sys
20+
import tempfile
1921
# Configure wx uversion to allow running test app in __main__
2022

2123

@@ -27,6 +29,7 @@
2729
import requests
2830
import wx
2931
from wx import Colour
32+
from os import path
3033

3134
from .. import version
3235
from ..utils.versioncomparator import cmp_versions, parse_version
@@ -116,7 +119,19 @@ def upgrade_from_dev_dialog(version_installed, notebook, show_no_update=False):
116119
f"{SPC}\n", wx.GetActiveWindow(), no_default=True):
117120
return False
118121
else:
122+
import zipfile
123+
backup_configobj = tempfile.NamedTemporaryFile(delete=False)
124+
config_obj_dir = path.join(path.dirname(__file__), '../preferences/configobj')
125+
files = os.listdir(config_obj_dir)
126+
with zipfile.ZipFile(backup_configobj.name, 'w') as zzip:
127+
for file in files:
128+
file_path = os.path.join(config_obj_dir, file)
129+
zzip.write(file_path)
119130
do_upgrade(command, notebook)
131+
with zipfile.ZipFile(backup_configobj.name, 'r') as zzip:
132+
zzip.extractall(config_obj_dir)
133+
print(f"DEBUG: updatentivier, {config_obj_dir=} {backup_configobj.name}")
134+
os.remove(backup_configobj.name)
120135
return True
121136
else:
122137
if show_no_update:
@@ -174,7 +189,7 @@ def do_upgrade(command, notebook):
174189
def start_upgraded(message):
175190
__ = message
176191
command = sys.executable + " -m robotide.__init__ --noupdatecheck"
177-
wx.CallLater(500, subprocess.Popen, command.split(' '), start_new_session=True)
192+
wx.CallLater(1000, subprocess.Popen, command.split(' '), start_new_session=True)
178193
p = psutil.Process()
179194
result = _askyesno(_("Completed Upgrade"), f"\n{SPC}{_('You should close this RIDE (Process ID = ')}{p.pid}){SPC}"
180195
f"\n{SPC}{_('Do you want to CLOSE RIDE now?')}\n{SPC}",

src/robotide/editor/gridbase.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,19 @@ def __init__(self, parent, num_rows, num_cols, popup_creator=None):
6262
self.GetGridRowLabelWindow().SetBackgroundColour(Colour(self.color_secondary_background))
6363
self.GetGridRowLabelWindow().SetForegroundColour(Colour(self.color_secondary_foreground))
6464
self._popup_creator = popup_creator or PopupCreator()
65+
"""
66+
DEBUG: This block adds aditional scrollbars in mains Grid Editor, making hard to focus on cells keeping the
67+
row numbers visible.
6568
if hasattr(parent, 'SetupScrolling'):
66-
parent.SetupScrolling()
67-
elif hasattr(self, 'SetupScrolling'):
68-
self.SetupScrolling()
69-
else:
70-
print("DEBUG: GridBase init NO SetupScrolling\n")
69+
parent.SetupScrolling(scrollToTop=True, scrollIntoView=True)
70+
print("DEBUG: GridBase init at PARENT SetupScrolling\n")
71+
elif
72+
"""
73+
if hasattr(self, 'SetupScrolling'):
74+
self.SetupScrolling(scrollToTop=True, scrollIntoView=True)
75+
# print("DEBUG: GridBase init at SELF SetupScrolling\n")
76+
# else:
77+
# print("DEBUG: GridBase init NO SetupScrolling\n")
7178

7279
def _bind_to_events(self):
7380
self.Bind(grid.EVT_GRID_SELECT_CELL, self.on_select_cell)

src/robotide/version.py

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

18-
VERSION = 'v2.2dev3'
18+
VERSION = 'v2.2dev4'

0 commit comments

Comments
 (0)