-
Notifications
You must be signed in to change notification settings - Fork 67
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: prevent coreview from losing focus when new machine is created #73
Conversation
Unfortunatelly, I have to report that logic seems to be broken for me still. When I open in empty mode, then open all three examples and then recompile some of them and witch to coreview and press recompile again then some other code is filled into program memory. It seems that current_srceditor reference is maintained incorrectly somewhere. I can try to add there print or use breakpoints to check when it is unintentionally changed. The most probably when coreview disappears then the first following tab is focussed and that reassigns the current_srceditor. The logic should workaround that problem probably such way, that code removing coreview tab should explicitly set focus to the current_srceditor the first if not empty and only then remove coreview. Some boolean variable should held that coreview has been closed when focused. Later, if focus is changed by user the bool should be negated. When coreview is inserted again and bool is asserted then the focus should be changed to it. In other case it should stay where it is. The logic is not nice and it is workaround but usability has precedence there. |
The more I think about it, the more I am convinced that it is not a good idea to have a joint tab widget with both core and editor. It creates all these weird situations, like not knowing which editor is selected because none is right now. It seems that the problem I tried to fix is part of a somewhat deeper problem of insufficient flexibility. I am closing this and starting a new issue to think this through. |
eb1ab15
to
73c53a5
Compare
@ppisa Try now, I have split the tabs for editor end coreview. I think it makes more sense like this. In the future, I would like to make both docks and get rid of the central widget. Then we should probably use this to get enough flexibility, without the central widget: https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System. |
I agree that from the code structure and application logic this solution is better but from the novice user perspective it is is questionable. It is little harder to guess where to click to get to my source file on the other hand it is logical that when I switch to editor I am at right tab. Some disadvantage is that if there is only single tab in the editor then the nae of the source file is not seen... May it be, it would worth to sacrifice some small vertical space in the editor on the top or bottom and put there whole path to the source, line and column numbers. If the path length is to long to fit into provided horizontal area then to replace starting part with ellipsis. I think there is such function in Qt to shorten paths... It would worth to get some feedback from the users for this change but generally if above mentioned glitches are resolved then I agree that internal logic enhancement and simplification prevails the need to adapt fr the change and need for two clicks instead of one in some use cases. |
f1d2a11
to
bc5b159
Compare
@ppisa please review Added
Fixed
|
adf6525
to
29b2846
Compare
29b2846
to
2f14bf0
Compare
resolves #79 |
No description provided.