-
Notifications
You must be signed in to change notification settings - Fork 574
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
CDockManager with flag "FocusHighlighting" - "Stealing" focus #334
Comments
I will try to fix this |
Much appreciated. Didn't you have a Paypal-Account? |
Please test the improve_focus_highlighting branch if it solves your problem. Please test it carefully and check if you see any focus highlighting issues that where not present in the current implementation. If you do not see any issues, I will merge the branch into master. |
Tested it just now and it works great. Thank you very much! Would you consider accepting two changes we did into the library?
|
Thank you for testing. Could you please open two separate pull request for your proposed changes so that we can discuss about the changes there? |
Hm. I have never done that before - I will have to find out how to do that first. I think we can close this issue. Thanks for your assistance! |
Hi.
In December I created an issue about a specific problem and more information was requested on that issue. Unfortunately I was very busy at that time and didn't react in time, so that issue was understandably closed. The issue is still a problem for us though, and I hope it is OK if I add it here again - this time with more information.
The problem is, that when using the config flag "CDockManager::FocusHighlighting" and adding a new tab, that tab automatically receives the focus by ADS source code:
`
void CDockWidgetTab::setActiveTab(bool active)
{
d->updateCloseButtonVisibility(active);
`
The stack looks like this:
'
qtadvanceddockingd.dll!ads::CDockWidgetTab::setActiveTab
qtadvanceddockingd.dll!ads::DockAreaTabBarPrivate::updateTabs
qtadvanceddockingd.dll!ads::CDockAreaTabBar::setCurrentIndex
qtadvanceddockingd.dll!ads::CDockAreaTabBar::insertTab
qtadvanceddockingd.dll!ads::CDockAreaWidget::insertDockWidget
qtadvanceddockingd.dll!ads::CDockAreaWidget::addDockWidget
'
The problem is as follows:
In our software we have a selection tree view which displays a list of files in which you can select a file by clicking on it or by using the arrow keys (like in Visual Studio if the "Preview selected files" option is active). When focussing a file the software opens a new tab in the dock manager in which the contents are displayed (again like Visual Studio). When the user changes the focus in the file list, another tab is opened and so on. With the current behavior of the dock manager, if "FocusHighlighting" is active, the focus is "transferred" to the newly created dock. So imagine a user trying to use the arrow keys to open some files - this is not possible, because the first created dock will "steal" the focus away.
A simple solution would be to add another config flag like "AutoFocusOnSetActiveTab" or something similar.
Thanks.
The text was updated successfully, but these errors were encountered: