Fix Page Editor hang on canvas click (TreeviewSelect feedback loop)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ so later rebinding would only ever be seen by the module that did it.
|
|||||||
import configparser
|
import configparser
|
||||||
import os
|
import os
|
||||||
|
|
||||||
VERSION = "0.0.0.124"
|
VERSION = "0.0.0.125"
|
||||||
PROPERTIES_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "editor.properties")
|
PROPERTIES_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "editor.properties")
|
||||||
DEFAULT_GRID_SIZE = 10
|
DEFAULT_GRID_SIZE = 10
|
||||||
DEFAULT_ADD_TIMESTAMP = True
|
DEFAULT_ADD_TIMESTAMP = True
|
||||||
|
|||||||
+5
-2
@@ -397,8 +397,11 @@ class OxPageViewPanel:
|
|||||||
|
|
||||||
for iid, comp in self._tree_items.items():
|
for iid, comp in self._tree_items.items():
|
||||||
if comp is widget:
|
if comp is widget:
|
||||||
self._tree.selection_set(iid)
|
# selection_set always fires <<TreeviewSelect>>, which calls
|
||||||
self._tree.see(iid)
|
# back into _select_widget — only set it when it changes.
|
||||||
|
if self._tree.selection() != (iid,):
|
||||||
|
self._tree.selection_set(iid)
|
||||||
|
self._tree.see(iid)
|
||||||
break
|
break
|
||||||
|
|
||||||
name = widget.get("name", "?")
|
name = widget.get("name", "?")
|
||||||
|
|||||||
Reference in New Issue
Block a user