Preserve the detached video dialog size when changing tools

The relayout to handle the changed subtoolbar size was fitting the
dialog to the size of the video, which was rather undesirable.
This commit is contained in:
Thomas Goyne 2013-12-21 08:24:59 -08:00
parent ae3b188d28
commit a4e8499e0a
1 changed files with 7 additions and 1 deletions

View File

@ -414,7 +414,13 @@ void VideoDisplay::SetTool(std::unique_ptr<VisualToolBase> new_tool) {
tool->SetToolbar(toolBar);
// Update size as the new typesetting tool may have changed the subtoolbar size
UpdateSize();
if (!freeSize)
UpdateSize();
else {
// UpdateSize fits the window to the video, which we don't want to do
GetGrandParent()->Layout();
tool->SetDisplayArea(viewport_left, viewport_top, viewport_width, viewport_height);
}
}
bool VideoDisplay::ToolIsType(std::type_info const& type) const {