Skip to content

Commit

Permalink
Fix missing link indication in User Keyword when pressing Ctrl in Gri…
Browse files Browse the repository at this point in the history
…d Editor
  • Loading branch information
HelioGuilherme66 committed Sep 20, 2023
1 parent 07209f8 commit 2f2b682
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni

=== Fixed

- Fixed missing indication of link for User Keyword, when pressing ``Ctrl`` in Grid Editor
- Fixed exception when finding GREY color for excluded files and directories in Project Tree
- Colorization of Grid Editor cells after the continuation marker ``...`` and correct parsing of those lines
- Colorization of Grid Editor cells when contents is list or dictionary variables
Expand Down
3 changes: 2 additions & 1 deletion src/robotide/application/CHANGELOG.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
Added variables creation shortcuts (``Ctrl-1,2,5``) to fields Arguments in Grid Editor
</li><li class="listitem">
Added support for JSON variables, by using the installed Robot Framework import method
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_fixed"></a>1.2. Fixed</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_fixed"></a>1.2. Fixed</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">Fixed missing indication of link for User Keyword, when pressing ``Ctrl`` in Grid Editor</li><li class="listitem">
Fixed exception when finding GREY color for excluded files and directories in Project Tree
</li><li class="listitem">
Colorization of Grid Editor cells after the continuation marker ``…`` and correct parsing of those lines
Expand Down
3 changes: 2 additions & 1 deletion src/robotide/application/releasenotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def set_content(self, html_win, content):
</ul>
<p><strong>New Features and Fixes Highlights</strong></p>
<ul class="simple">
<li>Fixed missing indication of link for User Keyword, when pressing <b>Ctrl</b> in Grid Editor</li>
<li>Added content help pop-up on Text Editor by pressing <b>Ctrl-M</b> for text at cursor position or selected autocomplete list item</li>
<li>Added Exclude option in context nenu for Test files, previously was only possible for Test Suites folders</li>
<li>Added exclusion of monitoring filesystem changes for files and directories excluded in Preferences</li>
Expand Down Expand Up @@ -237,6 +238,6 @@ def set_content(self, html_win, content):
<pre class="literal-block">
python -m robotide.postinstall -install
</pre>
<p>RIDE {VERSION} was released on 19/Sep/2023.</p>
<p>RIDE {VERSION} was released on 20/Sep/2023.</p>
</div>
"""
17 changes: 8 additions & 9 deletions src/robotide/editor/kweditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(self, parent, controller, tree):
self._controller.datafile_controller.register_for_namespace_updates(
self._namespace_updated)
self._tooltips = GridToolTips(self)
self._marked_cell = None
self._marked_cell = (-1, -1)
self._make_bindings()
self._write_steps(self._controller)
self.autosize()
Expand Down Expand Up @@ -256,9 +256,11 @@ def on_kill_focus(self, event):
def _execute(self, command):
return self._controller.execute(command)

def _toggle_underlined(self, cell):
def _toggle_underlined(self, cell, clear=False):
font = self.GetCellFont(cell.Row, cell.Col)
font.SetUnderlined(not font.Underlined)
toggle = not font.GetUnderlined() if not clear else False
self._marked_cell = cell if toggle else (-1, -1)
font.SetUnderlined(toggle)
self.SetCellFont(cell.Row, cell.Col, font)
self.Refresh()

Expand Down Expand Up @@ -731,7 +733,6 @@ def _cell_value(self, cell):
def _show_user_keyword_link(self, cell, value):
if cell != self._marked_cell and self._plugin.get_user_keyword(value):
self._toggle_underlined(cell)
self._marked_cell = cell

def _show_keyword_details(self, cell, value):
details = self._plugin.get_keyword_details(value)
Expand Down Expand Up @@ -872,8 +873,7 @@ def _navigate_to_matching_user_keyword(self, row, col):
value = self.GetCellValue(row, col)
uk = self._plugin.get_user_keyword(value)
if uk:
self._toggle_underlined((grid.GridCellCoords(row, col)))
self._marked_cell = None
self._toggle_underlined((grid.GridCellCoords(row, col)), True)
wx.CallAfter(self._tree.select_user_keyword_node, uk)
return True
return False
Expand All @@ -882,10 +882,9 @@ def _is_active_window(self):
return self.IsShownOnScreen() and self.FindFocus()

def _hide_link_if_necessary(self):
if not self._marked_cell:
if self._marked_cell == (-1, -1):
return
self._toggle_underlined(self._marked_cell)
self._marked_cell = None
self._toggle_underlined(self._marked_cell, True)

def on_create_keyword(self, event):
_ = event
Expand Down
4 changes: 3 additions & 1 deletion src/robotide/editor/texteditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,9 @@ def show_kw_doc(self):

def hide_kw_doc(self):
if self._information_popup:
self._information_popup.hide()
# self._information_popup.hide()
self._information_popup.Show(False)
self._information_popup.Destroy()
self._information_popup = None

def on_key_pressed(self, event):
Expand Down
2 changes: 1 addition & 1 deletion src/robotide/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# limitations under the License.
#
# Automatically generated by `tasks.py`.
VERSION = 'v2.0.8dev12'
VERSION = 'v2.0.8dev13'

0 comments on commit 2f2b682

Please sign in to comment.