FIX: Revert "[STUDIO-4284] not set max height of liveview window"
This reverts commit 0312aee4d9b92e23884be8802da9801ff3b9fe93. Reason for revert: STUDIO-5653 Jira: STUDIO-5653 Change-Id: If9d5f3e63968a0a54f9af1a2dae8f95f7f1f3f80
This commit is contained in:
parent
191ab5681f
commit
e744e433d5
|
@ -760,20 +760,20 @@ void wxMediaCtrl2::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||||
#else
|
#else
|
||||||
wxMediaCtrl::DoSetSize(x, y, width, height, sizeFlags);
|
wxMediaCtrl::DoSetSize(x, y, width, height, sizeFlags);
|
||||||
#endif
|
#endif
|
||||||
//if (sizeFlags & wxSIZE_USE_EXISTING) return;
|
if (sizeFlags & wxSIZE_USE_EXISTING) return;
|
||||||
//wxSize size = GetVideoSize();
|
wxSize size = GetVideoSize();
|
||||||
//if (size.GetWidth() <= 0)
|
if (size.GetWidth() <= 0)
|
||||||
// size = wxSize{16, 9};
|
size = wxSize{16, 9};
|
||||||
//int maxHeight = (width * size.GetHeight() + size.GetHeight() - 1) / size.GetWidth();
|
int maxHeight = (width * size.GetHeight() + size.GetHeight() - 1) / size.GetWidth();
|
||||||
//if (maxHeight != GetMaxHeight()) {
|
if (maxHeight != GetMaxHeight()) {
|
||||||
// // BOOST_LOG_TRIVIAL(info) << "wxMediaCtrl2::DoSetSize: width: " << width << ", height: " << height << ", maxHeight: " << maxHeight;
|
// BOOST_LOG_TRIVIAL(info) << "wxMediaCtrl2::DoSetSize: width: " << width << ", height: " << height << ", maxHeight: " << maxHeight;
|
||||||
// SetMaxSize({-1, maxHeight});
|
SetMaxSize({-1, maxHeight});
|
||||||
// CallAfter([this] {
|
CallAfter([this] {
|
||||||
// if (auto p = GetParent()) {
|
if (auto p = GetParent()) {
|
||||||
// p->Layout();
|
p->Layout();
|
||||||
// p->Refresh();
|
p->Refresh();
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue