-
Notifications
You must be signed in to change notification settings - Fork 55
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
Fix dock pane undocking #1044
Fix dock pane undocking #1044
Conversation
Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM with a couple of comments
@@ -75,3 +76,28 @@ def check_panes_and_exit(app_event): | |||
self.assertTrue(tool_attributes) | |||
for attr in tool_attributes: | |||
self.assertTrue(attr) | |||
|
|||
def test_dock_windows_undock(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure why this test wasn't failing earlier with the in/not in problem but from the looks of it, this test is manually undocking a dock pane and then checks the dock area of the dock panes in the app.
I'm not sure why by default undocking a dockpane means that it's left
widget area but that's what we seem to be asserting at the end. Do we need to be asserting this at all? Do we care what this value is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've manually verified that this doesn't crash, so I think the state is good.
The test is testing the dockpane area because it should not change when it is undocked (so yes, we do care about the value) - this was a deliberate choice as one option was to add an "undocked" dockpane area, but the behaviour (particularly when restoring from saved state) was unclear.
Fixes #1028
I am a little concerned there may be issues with serialization of undocked window state that are not fixed by this.