fix: pass correct number of records

This commit is contained in:
aclist committed 2026-02-27 22:53:31 +09:00
1 parent 1b1cb33a6e
commit 672c8f9e9e
4 files changed
+22 -13

No files matched your search

+14 -7
View File
@@ -50,15 +50,22 @@ class LogTreeView(ContextMixin, TreeView):
def _on_log_buttonpress(self, widget: Gtk.Widget, event: Gdk.EventButton) -> None:
if event.button == Gdk.BUTTON_SECONDARY:
path, col, x, y = self.get_path_at_pos(int(event.x), int(event.y))
if path:
selection = self.get_selection()
model, selected_paths = selection.get_selected_rows()
if path not in selected_paths:
selection.select_path(path)
self.present_menu(widget, event)
return True
return False
#selection = self.get_selection()
#model, selected_paths = selection.get_selected_rows()
#if len(selected_paths) > 1:
# for path in selected_paths:
# selection.select_path(path)
# path, col, x, y = self.get_path_at_pos(int(event.x), int(event.y))
# if path:
# selection = self.get_selection()
# model, selected_paths = selection.get_selected_rows()
# if path not in selected_paths:
# selection.select_path(path)
# self.present_menu(widget, event)
# return True
#return False
def _on_log_keypress(self, widget: Gtk.Widget, event: Gdk.EventKey) -> None:
self.present_menu(widget, event)