Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with Layer + Right Button click #52

Closed
LingamYoni opened this issue Mar 29, 2019 · 0 comments
Closed

Bug with Layer + Right Button click #52

LingamYoni opened this issue Mar 29, 2019 · 0 comments

Comments

@LingamYoni
Copy link

Steps to reproduce:

  1. Open, compile and run graphics32\Examples\Layers\ImgView_Layers\ImgView_Layers.dpr
  2. File->New...-> click Ok
  3. Layers->New Bitmap Layer (or any)-> open
  4. Right click on the layer. Now try to click on any menu item or close the program.

What is the expected behavior?
A tap on the button should fire the click event.

What is the current behavior?
The first tap highlights the button. The second tap fires the click event.

Thus, buttons need to be tapped twice in order to fire the click event!
There is no such problem with the left click on the layer.

Is there any way to fix this abnormal behavior?
My current workaround is

procedure TMainForm.ImgViewMouseUp(Sender: TObject; Button: TMouseButton;
    Shift: TShiftState; X, Y: Integer; Layer: TCustomLayer);
begin
  if Button = mbRight then ReleaseCapture;
end;
andersmelander pushed a commit that referenced this issue Apr 4, 2019
Mouse capture is now released in TCustomImage32.MouseUp if a layer had the capture but released it due to MouseUp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants