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 32acb6067b
commit 3c8160f1e3

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 {