mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 06:32:53 +01:00
fix: suppress headers if no model is loaded
This commit is contained in:
1 parent
c4cc9f04c4
commit
e2d6a462db
1 file changed
+1
-2
@@ -30,8 +30,6 @@ class ModTreeView(ModsMixin, ContextMixin, TreeView): # type: ignore
|
|||||||
emitter.connect("mods_highlighted", self._on_mods_highlighted)
|
emitter.connect("mods_highlighted", self._on_mods_highlighted)
|
||||||
|
|
||||||
self.set_fixed_height_mode(True)
|
self.set_fixed_height_mode(True)
|
||||||
self.set_headers_visible(True)
|
|
||||||
|
|
||||||
self.set_model(None)
|
self.set_model(None)
|
||||||
|
|
||||||
for i, column_title in enumerate(strings.mod_cols):
|
for i, column_title in enumerate(strings.mod_cols):
|
||||||
@@ -64,6 +62,7 @@ class ModTreeView(ModsMixin, ContextMixin, TreeView): # type: ignore
|
|||||||
def _on_mods_updated(self, emitter: "Emitter", msg: str, mods: int) -> None:
|
def _on_mods_updated(self, emitter: "Emitter", msg: str, mods: int) -> None:
|
||||||
if mods < 1:
|
if mods < 1:
|
||||||
return
|
return
|
||||||
|
self.set_headers_visible(True)
|
||||||
path = Gtk.TreePath.new_from_indices([0])
|
path = Gtk.TreePath.new_from_indices([0])
|
||||||
self.set_cursor(path)
|
self.set_cursor(path)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user