From: vsr Date: Wed, 15 Oct 2014 16:18:20 +0000 (+0400) Subject: 0022712: [CEA 1300] LightApp_PreferencesDlg - invalid layout / resize policy X-Git-Tag: V7_5_0b1~20^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=79bb613bc02da5864a9c4199f78c078cc77e78e2;p=modules%2Fgui.git 0022712: [CEA 1300] LightApp_PreferencesDlg - invalid layout / resize policy Fix improper applying of "stretch" property in case if frame pref item is scrollable" --- diff --git a/src/Qtx/QtxPagePrefMgr.cxx b/src/Qtx/QtxPagePrefMgr.cxx index 5d5571fb2..d3631e689 100644 --- a/src/Qtx/QtxPagePrefMgr.cxx +++ b/src/Qtx/QtxPagePrefMgr.cxx @@ -1343,7 +1343,10 @@ bool QtxPagePrefFrameItem::stretch() const void QtxPagePrefFrameItem::setStretch( const bool on ) { QSpacerItem* s = 0; - QLayout* l = widget() ? widget()->layout() : 0; + QWidget* w = widget(); + if ( qobject_cast( w ) ) + w = qobject_cast( w )->widget(); + QLayout* l = w ? w->layout() : 0; for ( int i = 0; l && i < l->count() && !s; i++ ) s = l->itemAt( i )->spacerItem();