Closed e-calder closed 4 years ago
Thanks for the detailed report !!! very helpful.
I agree with your diagnosis and put together a PR (#386) that fixed the issue. Let me know if you agree it fixes the issue.
No problem, I know how annoying it can be to receive half baked bug reports without enough information!
Thanks for the quick fix, I can confirm it works and that it fixes my issue. Cheers!
Bug:
If you have a nested dock area which contains a single dock item, and wish to add a new tab to that nested dock area via InsertTab, the docking framework will actually insert it into the wrong tab widget.
The method QDockContainer dockTabBarWidget() should return None in the case of the tab widget not existing yet, but it will actually return the tab widget of the outer DockArea.
Below is a small standalone example enaml file which you can run simply with
enaml_run [filename].enaml
Potential fix... maybe?
One potential fix could be to change QDockContainer.dockTabBarWidget() such that this function will only return the found QDockTabWidget if the parent dock area of that QDockTabWidget equals the parent dock area of the current QDockContainer. Open to suggestions...