Draw: RClick menu opens after RMB dragging with an editable shape

*** Please report new bugs here! ***

Moderators: XnTriq, helmut, xnview, Dreamer

Post Reply
Anibina
Posts: 28
Joined: Fri Apr 26, 2019 7:53 am

Draw: RClick menu opens after RMB dragging with an editable shape

Post by Anibina »

Draw: RClick menu opens after RMB dragging with an editable shape

System
XnView MP Windows, Version 0.98.4 64bits (May 28 2021)
Windows Version 21H1

Reproduction steps
open an image
open the draw window: image > draw
zoom in, so that the image can be right mouse button dragged
select the "Draw a rectangle" tool
draw a rectangle on the image
hold down the right mouse button
move the mouse to drag the image
release the right mouse button

Expected
nothing should happen

Observed
a menu opens, with the options:
Move to front
Move to back
------------
Delete

Screen recording:
https://imgur.com/a/O9lT3Tz

Notes
Trying to dismiss the menu by left clicking outside the menu,
commits the shape, which means that it can't be edited anymore.

The menu can be dismissed without committing the shape,
by pressing Escape,
or by left clicking outside the image,
for example on the draw windows title bar, scrollbars,
on some of the tools (zoom, select, color picker, color swatches),
or on an empty are of the bottom of the draw window.

Another method for closing the menu, without sending a left click to the window below,
is to hold down the left mouse button on the menu, then move the mouse cursor outside
the menu and release the left mouse button. (this also works in other Windows applications)

But it would be better if the menu didn't open when the image has been dragged.

There probably needs to be a small "buffer" (an amount the mouse pointer can move and the menu still will open),
because it seems like the image can be dragged by a single pixel,
so it's easy to drag slightly when right clicking.

If the menu was suppressed with any amount of dragging, then it might be difficult to open the right click menu.

Update:
I noticed that there is no "buffer" for the right click menu in the XnView MP viewer.

Pressing the right mouse button and moving the mouse pointer even a single pixel,
prevents the menu from opening.

It might also be helpful to add a minimum allowed amount that the mouse pointer can be moved,
when the right mouse button is pressed, and the menu still will open.

Maybe the limit could be 3 pixels.
Post Reply