added selecting row under the cursor for all views

This commit is contained in:
DYefremov
2018-09-22 21:14:56 +03:00
parent 1c0ca0dbeb
commit 962db5f736
2 changed files with 4 additions and 1 deletions

View File

@@ -532,7 +532,8 @@ class MainAppWindow:
def on_view_drag_begin(self, view, context):
""" Selects a row under the cursor in the view at the dragging beginning. """
if view.get_selection().selection.count_selected_rows() > 1:
selection = view.get_selection()
if selection.count_selected_rows() > 1:
view.do_toggle_cursor_row(view)
def on_view_drag_data_get(self, view, drag_context, data, info, time):

View File

@@ -2048,6 +2048,7 @@ Author: Dmitriy Yefremov
<property name="activate_on_single_click">True</property>
<signal name="button-press-event" handler="on_fav_press" object="fav_popup_menu" swapped="no"/>
<signal name="button-press-event" handler="on_view_press" swapped="yes"/>
<signal name="drag-begin" handler="on_view_drag_begin" swapped="no"/>
<signal name="drag-data-get" handler="on_view_drag_data_get" swapped="no"/>
<signal name="drag-data-received" handler="on_view_drag_data_received" swapped="no"/>
<signal name="focus-in-event" handler="on_view_focus" swapped="no"/>
@@ -2292,6 +2293,7 @@ Author: Dmitriy Yefremov
<property name="activate_on_single_click">True</property>
<signal name="button-press-event" handler="on_view_popup_menu" object="bouquets_popup_menu" swapped="no"/>
<signal name="button-press-event" handler="on_view_press" swapped="yes"/>
<signal name="drag-begin" handler="on_view_drag_begin" swapped="no"/>
<signal name="drag-data-get" handler="on_view_drag_data_get" swapped="no"/>
<signal name="drag-data-received" handler="on_bq_view_drag_data_received" swapped="no"/>
<signal name="focus-in-event" handler="on_view_focus" swapped="no"/>