Bug #3800 - Resize viewport when CV_WINDOW_KEEPRATIO was set (Qt)

This commit is contained in:
Dominik Kleiser 2015-07-17 20:02:01 +02:00
parent 0726c4d4ea
commit f363670934

View File

@ -2591,6 +2591,7 @@ void DefaultViewPort::resizeEvent(QResizeEvent* evnt)
if (fabs(ratioX - ratioY) * 100 > ratioX) //avoid infinity loop / epsilon = 1% of ratioX
{
resize(newSize);
viewport()->resize(newSize);
//move to the middle
//newSize get the delta offset to place the picture in the middle of its parent