Bug 799090 - Right Clicking scheduled transaction

If you have a highlighted SX and you right click on another SX the new,
edit, delete popup uses the highlighted SX not the one you clicked on.
This is misleading because the box appears at the right clicked
location, and it looks like that is the SX it will affect.

To fix this, check to see if SX right clicked on is selected, if not
unselect all SX's and select the one clicked on before popup.
This commit is contained in:
Robert Fewell 2023-10-15 12:50:34 +01:00
parent af48ab7cc2
commit ceb21790b4

View File

@ -425,6 +425,20 @@ treeview_button_press (GtkTreeView *treeview, GdkEvent *event,
GdkEventButton *event_button = (GdkEventButton*)event;
if (event_button->button == GDK_BUTTON_SECONDARY)
{
GtkTreePath *path = NULL;
if (gtk_tree_view_get_path_at_pos (priv->tree_view, event_button->x, event_button->y,
&path, NULL, NULL, NULL))
{
GtkTreeSelection *selection = gtk_tree_view_get_selection (priv->tree_view);
if (!gtk_tree_selection_path_is_selected (selection, path))
{
gtk_tree_selection_unselect_all (selection);
gtk_tree_selection_select_path (selection, path);
}
}
gtk_tree_path_free (path);
treeview_popup (tree_view, event, page);
return TRUE;
}