From e140a1c7cb8711a356daafcab5eaa4024f4e5e58 Mon Sep 17 00:00:00 2001 From: nevarek Date: Tue, 31 Aug 2021 04:37:16 -0700 Subject: [PATCH] fix(gtk): select cloned item --- CHANGELOG.rst | 7 ++++--- lib/autokey/gtkui/configwindow.py | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 43750d33..76e54d3e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,8 +17,9 @@ Features --------- Create a GUI-free headless entrypoint to autokey, which can be run without GUI libraries and controlled purely via scripting API -.. Bug fixes -.. --------- +Bug fixes +--------- +- Fix selection when cloning a phrase or script Version 0.96.0-beta.9 ============================ @@ -142,7 +143,7 @@ Bug fixes - Both QT and GTK versions will reload hotkeys after a keymap change event. - Fix locking issue - Expose Alt_GR as a hotkey modifier on GTK. -- (GTK) Fixed GUI lock-up, if multiple script error notifications are posted in quick succession. The notifications are now rate-limited and won’t post more than one notification per second. Fixes issue #383 +- (GTK) Fixed GUI lock-up, if multiple script error notifications are posted in quick succession. The notifications are now rate-limited and won’t post more than one notification per second. Fixes issue #383 Scripting API +++++++++++++ diff --git a/lib/autokey/gtkui/configwindow.py b/lib/autokey/gtkui/configwindow.py index b52bb4e2..93c707ef 100644 --- a/lib/autokey/gtkui/configwindow.py +++ b/lib/autokey/gtkui/configwindow.py @@ -1196,6 +1196,9 @@ def on_clone_item(self, widget, data=None): self.app.monitor.unsuspend() newIter = theModel.append_item(newObj, parentIter) + self.treeView.get_selection().unselect_all() + self.treeView.get_selection().select_iter(newIter) + self.on_tree_selection_changed(self.treeView) self.app.config_altered(False) def on_delete_item(self, widget, data=None):