FanTranslatorsInternational / Kuriimu2

Kuriimu is a general purpose game translation project manager and toolkit for authors of fan translations and game mods.
GNU General Public License v3.0
317 stars 58 forks source link

Impossible to close files once multiple rows are present #132

Closed Josu-A closed 3 years ago

Josu-A commented 3 years ago

Bug details:

While opening new files, if you manage to get a second row appear you will be unable to close any currently opened file.

This can be worked around by extending the horizontal view of the window enough so that only one row is present, then close the file and resize the window back.

onepiecefreak3 commented 3 years ago

Sorry, I don't understand what that means. Where does a second row appear? Can you add screenshots and elaborate more on the issue? Also on which OS do you run Kuriimu2?

Josu-A commented 3 years ago

Sorry about that. With rows I mean the file names that appear on top for navigation, could call them tabs.

OS: Windows 10 Last Kuriimu2 version

Kuriimu2_QdVG8I4S27

onepiecefreak3 commented 3 years ago

And you cannot close them at all? Clicking on the red X or using middle mouse button? Both should work to close any file from any row of tabs.

Josu-A commented 3 years ago

Clicking the X does nothing surprisingly, to any file. But using the middle mouse button does work though, didn't even know this was a feature (!)

onepiecefreak3 commented 3 years ago

So clicking the X, no matter the row, does nothing? Or can files be closed on the top/bottom row of tabs?

Josu-A commented 3 years ago

No matter the row the X button will do nothing. Once you click the X of a file on top, instead of closing the tab looks like it first moves the tab to the most bottom position and then fails to close it. Also tried with 3+ rows but the bug persists.

onepiecefreak3 commented 3 years ago

Ok, I could isolate the bug. If there are multiple rows of tabs, you can close tabs of the most bottom row by clicking on the far left of the tab. This is where we expect the X to be at all times and we only check this region for a click event to close the file. But as seen here, this isn't always true, the X is left aligned to the text of the tab instead. Trying to click the most left part of a tab in another row, the row said tab is in will first move to the bottom, which again invalidates the region we check for a click event to close the file.

Both behaviours that cause this bug are features of the underlying GUI framework, Eto.Forms, that we use. So completely disabling them to mitigate the bug is not possible. We will try to solve the bug by reworking our click region check.

Josu-A commented 3 years ago

Nice eye, good catch. Good luck with it!

onepiecefreak3 commented 3 years ago

Investigating this issue brought some deeper complications with the TabControl in general. Those however are too large to fix them for now. Those complications are only present on Linux and MacOS platforms, so Windows is unaffected and therefore irrelevant to this issue.

We added a workaround to make the X clickable and work on Windows now. This workaround is in the newest dev build and will be part of the upcoming 1.2.1 Release.