Fix infinite loop when opening video with wxgtk
Originally committed to SVN as r5954.
This commit is contained in:
parent
90582c0b15
commit
d6ba00883e
1 changed files with 12 additions and 9 deletions
|
@ -312,19 +312,22 @@ void VideoDisplay::UpdateSize(int arType, double arValue) {
|
|||
viewport_height = h;
|
||||
|
||||
wxSize size(cw, ch);
|
||||
if (size != GetClientSize()) {
|
||||
SetMinClientSize(size);
|
||||
SetMaxClientSize(size);
|
||||
|
||||
SetEvtHandlerEnabled(false);
|
||||
GetGrandParent()->Layout();
|
||||
|
||||
// The sizer makes us use the full width, which at very low zoom levels
|
||||
// results in stretched video, so after using the sizer to update the
|
||||
// parent window sizes, reset our size to the correct value
|
||||
// The sizer makes us use the full width, which at very low zoom
|
||||
// levels results in stretched video, so after using the sizer to
|
||||
// update the parent window sizes, reset our size to the correct
|
||||
// value
|
||||
SetSize(cw, ch);
|
||||
|
||||
SetEvtHandlerEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (tool.get())
|
||||
tool->SetDisplayArea(viewport_left, viewport_top, viewport_width, viewport_height);
|
||||
|
|
Loading…
Reference in a new issue