forked from mia/Aegisub
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,18 +312,21 @@ void VideoDisplay::UpdateSize(int arType, double arValue) {
|
||||||
viewport_height = h;
|
viewport_height = h;
|
||||||
|
|
||||||
wxSize size(cw, ch);
|
wxSize size(cw, ch);
|
||||||
SetMinClientSize(size);
|
if (size != GetClientSize()) {
|
||||||
SetMaxClientSize(size);
|
SetMinClientSize(size);
|
||||||
|
SetMaxClientSize(size);
|
||||||
|
|
||||||
SetEvtHandlerEnabled(false);
|
SetEvtHandlerEnabled(false);
|
||||||
GetGrandParent()->Layout();
|
GetGrandParent()->Layout();
|
||||||
|
|
||||||
// The sizer makes us use the full width, which at very low zoom levels
|
// The sizer makes us use the full width, which at very low zoom
|
||||||
// results in stretched video, so after using the sizer to update the
|
// levels results in stretched video, so after using the sizer to
|
||||||
// parent window sizes, reset our size to the correct value
|
// update the parent window sizes, reset our size to the correct
|
||||||
SetSize(cw, ch);
|
// value
|
||||||
|
SetSize(cw, ch);
|
||||||
|
|
||||||
SetEvtHandlerEnabled(true);
|
SetEvtHandlerEnabled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tool.get())
|
if (tool.get())
|
||||||
|
|
Loading…
Reference in a new issue