From: vsv Date: Thu, 27 Nov 2014 09:01:18 +0000 (+0300) Subject: Merge branch 'Dev_0.6' of newgeom:newgeom into Dev_0.6 X-Git-Tag: V_0.6.0^2~60 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=efaa3e56c591f0b6a0e018cc91027ff5f82b2438;p=modules%2Fshaper.git Merge branch 'Dev_0.6' of newgeom:newgeom into Dev_0.6 Conflicts: src/XGUI/XGUI_PropertyPanel.cpp --- efaa3e56c591f0b6a0e018cc91027ff5f82b2438 diff --cc src/XGUI/XGUI_PropertyPanel.cpp index 2e6d68ca4,2830d85c1..1fc6d8a92 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@@ -7,6 -7,8 +7,7 @@@ #include #include -#include + #include #include #include @@@ -80,23 -81,34 +82,33 @@@ void XGUI_PropertyPanel::cleanContent( void XGUI_PropertyPanel::setModelWidgets(const QList& theWidgets) { myWidgets = theWidgets; - int aS = myWidgets.size(); if (theWidgets.empty()) return; - + bool isEnableStretch = true; QList::const_iterator anIt = theWidgets.begin(), aLast = theWidgets.end(); for (; anIt != aLast; anIt++) { connect(*anIt, SIGNAL(keyReleased(QKeyEvent*)), this, SIGNAL(keyReleased(QKeyEvent*))); - - connect(*anIt, SIGNAL(focusOutWidget(ModuleBase_ModelWidget*)), this, - SLOT(activateNextWidget(ModuleBase_ModelWidget*))); + connect(*anIt, SIGNAL(focusOutWidget(ModuleBase_ModelWidget*)), + this, SLOT(activateNextWidget(ModuleBase_ModelWidget*))); connect(*anIt, SIGNAL(focusInWidget(ModuleBase_ModelWidget*)), - this, SLOT(activateWidget(ModuleBase_ModelWidget*))); + this, SLOT(activateWidget(ModuleBase_ModelWidget*))); - ModuleBase_WidgetPoint2D* aPointWidget = dynamic_cast(*anIt); - if (aPointWidget) { - connect(aPointWidget, SIGNAL(storedPoint2D(ObjectPtr, const std::string&)), - this, SIGNAL(storedPoint2D(ObjectPtr, const std::string&))); + //ModuleBase_WidgetPoint2D* aPointWidget = dynamic_cast(*anIt); + //if (aPointWidget) + // connect(aPointWidget, SIGNAL(storedPoint2D(ObjectPtr, const std::string&)), this, + // SIGNAL(storedPoint2D(ObjectPtr, const std::string&))); + } + + if (!isEnableStretch) continue; + foreach(QWidget* eachWidget, (*anIt)->getControls()) { + QSizePolicy::Policy aVPolicy = eachWidget->sizePolicy().verticalPolicy(); + if(aVPolicy == QSizePolicy::Expanding || + aVPolicy == QSizePolicy::MinimumExpanding) { + isEnableStretch = false; + } + } } + setStretchEnabled(isEnableStretch); ModuleBase_ModelWidget* aLastWidget = theWidgets.last(); if (aLastWidget) { QList aControls = aLastWidget->getControls();