From: asl Date: Thu, 13 Aug 2015 08:00:20 +0000 (+0300) Subject: Issue #460: the correct clearing of the layout to set the row stretch to default... X-Git-Tag: V_1.4.0_beta4~393 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=676d468ad2d34eba5def482ef14158313d1bbaa5;p=modules%2Fshaper.git Issue #460: the correct clearing of the layout to set the row stretch to default value --- diff --git a/src/ModuleBase/ModuleBase_PageBase.cpp b/src/ModuleBase/ModuleBase_PageBase.cpp index 027150f22..f7057783e 100644 --- a/src/ModuleBase/ModuleBase_PageBase.cpp +++ b/src/ModuleBase/ModuleBase_PageBase.cpp @@ -48,6 +48,20 @@ void ModuleBase_PageBase::clearPage() delete aChild; } } + + // Issue #460: this patch is necessary since the row stretch information + // is stored independently on the items: when the items are removed + // from the layout the stretch information is kept, so in the next + // filling of the layout some "additional" (old) rows may be stretched + // without necessity. + // In this patch we clear the stretch information specifying the default value: 0. + QGridLayout* aLayout = dynamic_cast( pageLayout() ); + if( aLayout ) + { + int r = aLayout->rowCount(); + for( int i=0; isetRowStretch( i, 0 ); + } myWidgetList.clear(); }