]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
0022712: [CEA 1300] LightApp_PreferencesDlg - invalid layout / resize policy
authorvsr <vsr@opencascade.com>
Wed, 15 Oct 2014 16:18:20 +0000 (20:18 +0400)
committervsr <vsr@opencascade.com>
Wed, 15 Oct 2014 16:18:20 +0000 (20:18 +0400)
Fix improper applying of "stretch" property in case if frame pref item is scrollable"

src/Qtx/QtxPagePrefMgr.cxx

index 5d5571fb2df0fd484c395e6eb39c141708243ef0..d3631e689bc053d1fbabba3edbac6d2dc736441c 100644 (file)
@@ -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<QScrollArea*>( w ) )
+    w = qobject_cast<QScrollArea*>( w )->widget();
+  QLayout* l = w ? w->layout() : 0;
   for ( int i = 0; l && i < l->count() && !s; i++ )
     s = l->itemAt( i )->spacerItem();