Ginj-capture / Ginj

Ginj capture
GNU General Public License v3.0
26 stars 7 forks source link

Can't delete a second box #37

Open DennisPolack opened 3 years ago

DennisPolack commented 3 years ago

If a second box is added, it is almost impossible to delete. I generally reduce it to the minimum size and tuck it away in a corner. Surprisingly you can also drag it completely out of the GINJ capture area,

vicnevicne commented 3 years ago

?? That is weird. Once an overlay is selected (with 4 square handles shown, just by clicking on one of its edges), hitting the "del" key should delete it. Never had an issue or a complaint with that feature. Can you specify if you have issues selecting the frame, or if the del key has no effect once the frame is selected ?

DennisPolack commented 3 years ago

Hi Vicne,

I have no problem selecting and high-lighting the overlay but sometimes I have the situation where I have more than one overlay and when I try to delete one of them It will not delete.

I have just tried to simulate the problem by adding 4 boxes, adding some text to each and had no problems in deleting them. There is obviously some sequence of events which causes

the problem because sometimes I just cannot delete a box. I normally resort to making it as small as possible ( a round dot) and then tuck it away somewhere.

An interesting bug is: Create a box and drag it out of the main area so that it is completely out of sight and try to save. I thing this what triggers the Error “Determining Target Area”

I attempted this when deleting a box failed.

Have you thought about adding a “Print Screen” feature ?

Best Wishes

Dennis

vicnevicne commented 2 years ago

Oh, I just realized something: You can only delete an overlay (box, arrow) after you have unselected it and reselected it. For example, if you create a text area and type some text, the "Delete" key will delete the character to the right of the cursor (if any), just like in Word or Notepad. So it is indeed impossible to delete the box at that stage. But if you click outside the box to unselect it, and then you click on the box again, the "Delete" key will delete the box. Can you confirm it is the way it works for you ?

DennisPolack commented 2 years ago

I have just tried and the boxes were deleting happily. I have a feeling that the problem will come back and I will let you know if it does. Thanks for your rapid responses. Wishing you a Merry Christmas and A Healthy and Successful New Year.

vicnevicne commented 6 months ago

Update: I encountered similar issues in other parts of the code and I think I know the reason: https://stackoverflow.com/questions/8936536/java-mouse-events-ignored-when-mouse-is-moving If you move the mouse ever so slightly between the button "press" and "release", Java does not count it as a "click". Usually (at least on Windows), such a sequence (press-move-release) is still considered a click until a movement threshold is reached, in which case it switches to drag-and-drop. This might explain why this case cannot be reproduced easily, and I now understand the "I have to give it a very good click". This might be the cause of this issue as well as issues #38 #41 #42 #50 #51 I will try to fiddle with "mouseReleased" event instead of "mouseClicked" as suggested in the thread. That should help, at least for parts of the UI I have control over (i.e not the folder selection which is native Java dialog).