mirror of https://github.com/MidnightCommander/mc
Ticket #2556 (incorrect files mark by mouse)
What steps will reproduce the problem? 1) activate left panel 2) start mark files by mouse right button 3) drag cursor into right panel What is the expected output? files are not marked in the right panel What do you see instead? files are marked in the right panel. it is not correct Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
parent
2ed2895cd1
commit
5e6e6aa37a
|
@ -346,6 +346,9 @@ static char *panel_history_prev_item_sign = NULL;
|
|||
static char *panel_history_next_item_sign = NULL;
|
||||
static char *panel_history_show_list_sign = NULL;
|
||||
|
||||
/* Panel that selection started */
|
||||
static WPanel *mouse_mark_panel = NULL;
|
||||
|
||||
static int mouse_marking = 0;
|
||||
|
||||
/*** file scope functions ************************************************************************/
|
||||
|
@ -2972,6 +2975,7 @@ mouse_toggle_mark (WPanel * panel)
|
|||
{
|
||||
do_mark_file (panel, MARK_DONT_MOVE);
|
||||
mouse_marking = selection (panel)->f.marked;
|
||||
mouse_mark_panel = current_panel;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -2979,10 +2983,14 @@ mouse_toggle_mark (WPanel * panel)
|
|||
static void
|
||||
mouse_set_mark (WPanel * panel)
|
||||
{
|
||||
if (mouse_marking && !(selection (panel)->f.marked))
|
||||
do_mark_file (panel, MARK_DONT_MOVE);
|
||||
else if (!mouse_marking && (selection (panel)->f.marked))
|
||||
do_mark_file (panel, MARK_DONT_MOVE);
|
||||
|
||||
if (mouse_mark_panel == panel)
|
||||
{
|
||||
if (mouse_marking && !(selection (panel)->f.marked))
|
||||
do_mark_file (panel, MARK_DONT_MOVE);
|
||||
else if (!mouse_marking && (selection (panel)->f.marked))
|
||||
do_mark_file (panel, MARK_DONT_MOVE);
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
|
Loading…
Reference in New Issue