Skip to content

Commit 0f8348d

Browse files
committed
tooledit_widget: fix selection + add scroll to selection
The selection appeared in the "wear-offsets" tab instead of the !all offsets" tab.
1 parent f575b36 commit 0f8348d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/python/gladevcp/tooledit_widget.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def get_selected_row(self):
233233

234234
def set_selected_tool(self,toolnumber):
235235
try:
236-
treeselection = self.view2.get_selection()
236+
treeselection = self.view1.get_selection()
237237
liststore = self.model
238238
def match_tool(model, path, iter, pathlist):
239239
if model.get_value(iter, 1) == toolnumber:
@@ -245,6 +245,7 @@ def match_tool(model, path, iter, pathlist):
245245
if len(pathlist) == 1:
246246
liststore.set_value(liststore.get_iter(pathlist[0]),0,1)
247247
treeselection.select_path(pathlist[0])
248+
self.view1.scroll_to_cell(pathlist[0], None, True, 0.5, 0.0)
248249
except:
249250
print(_("tooledit_widget error: cannot select tool number"),toolnumber)
250251

0 commit comments

Comments
 (0)