-
Notifications
You must be signed in to change notification settings - Fork 86
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
GUI: IndexOutOfBoundsException #575
Comments
I think this bug is fixed with #262. I cannot reproduce it |
Alright... I was finally able to reproduce this problem running the code from the master branch.
The problem here is when we try to delete an item from the favorites list without ever giving the focus to the favorites list. In other words, if we select one of the items from the list before we try to delete, this error never happens. Right after deleting that item, the first item in the list gets automatically selected, so if we right click over the last item on the list and select the delete option, the first item in the list is the one that gets deleted, because that's the one that was selected. This is misleading because when we right click over an item in the list and the context menu is displayed, it gives the impression that the menu is for the item the cursor was over when the right click was performed. The are a few ways to fix this problem, but I'm only going to suggest the one that I like the most. When we right click on any of the items in the favorites list, the item under the cursor should be automatically selected (display highlighted) and then we can display the context menu for that item. Only then the user can proceed to delete the item. I've seen other apps work like this so I bet many users are used to that behavior, including @cdalexndr :p @svennissel I can work on fixing this issue. Can you assign it to me? |
This is a good way to fix it. Thank you. I think the project is active again. Did you have an idear how we can discuss other things like next steps, releases an other thinks? Did we need something like a forum? |
Github has a discussions feature you can enable on the project! |
@svennissel yeah, I like how we’re getting a lot of activity going on in this project. That’s awesome! |
@svennissel check this out: https://docs.github.com/en/discussions/quickstart |
Ahh thanks. But I have no permissions to change this. I will ask the otros owner. |
… cell when it's selected | Updated the behavior of the right click on the list of Favorite locations so that the cell clicked over gets selected and then the popup menu is displayed
@benlazaro I you are ready, please create a pull request? |
I'm not done with this yet. The code in the "open file" dialog class it's basically a God Class. I has so much code and there is not separation of concerns that I'm actually fixing the whole thing for maintainability purposes. I got a fix for the bug, but there are some other minor UI functionalities that I have to take care of as well, that's why I decided to improve the code maintainability so that we can easily make changes later. |
File select dialog.
Add favorite two times to create duplicate.
Right click -> delete one duplicate.
OtrosLogViewer 1.4.13
The text was updated successfully, but these errors were encountered: