mirror of
https://github.com/aclist/dztui.git
synced 2026-08-27 10:17:31 +02:00
fix: suppress keynav actions on small models
This commit is contained in:
parent
3092e52515
commit
83d78e74de
@ -89,7 +89,7 @@ class TreeView(CursorMixin, Gtk.TreeView): # type: ignore
|
||||
|
||||
if is_navkey(event.keyval):
|
||||
# TODO: if model is None
|
||||
if len(self.get_model()) < 1:
|
||||
if len(self.get_model()) < 2:
|
||||
return
|
||||
if self.sel_blocked is False:
|
||||
self.controller.suppress_signal(
|
||||
@ -113,6 +113,9 @@ class TreeView(CursorMixin, Gtk.TreeView): # type: ignore
|
||||
# self.get_selection().select_iter(it)
|
||||
# return True
|
||||
|
||||
if len(self.get_model()) < 2:
|
||||
return
|
||||
|
||||
if is_navkey(event.keyval):
|
||||
if self.sel_blocked is True:
|
||||
self.controller.suppress_signal(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user