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:
parent
32acb6067b
commit
3c8160f1e3
1 changed files with 7 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue