]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'Dev_0.6' of newgeom:newgeom into Dev_0.6
authorvsv <vitaly.smetannikov@opencascade.com>
Thu, 27 Nov 2014 09:01:18 +0000 (12:01 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Thu, 27 Nov 2014 09:01:18 +0000 (12:01 +0300)
Conflicts:
src/XGUI/XGUI_PropertyPanel.cpp

1  2 
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/XGUI/XGUI_PropertyPanel.cpp
src/XGUI/XGUI_PropertyPanel.h

index 2e6d68ca41242dca142c2d8a9c973b943cd44a25,2830d85c149621163459792ed82cd09fce3d27c2..1fc6d8a92bfe56a8664ecf73cdf08ec05e367831
@@@ -7,6 -7,8 +7,7 @@@
  
  #include <XGUI_PropertyPanel.h>
  #include <XGUI_Constants.h>
 -#include <ModuleBase_WidgetPoint2D.h>
+ #include <ModuleBase_WidgetMultiSelector.h>
  
  #include <QWidget>
  #include <QVBoxLayout>
@@@ -80,23 -81,34 +82,33 @@@ void XGUI_PropertyPanel::cleanContent(
  void XGUI_PropertyPanel::setModelWidgets(const QList<ModuleBase_ModelWidget*>& theWidgets)
  {
    myWidgets = theWidgets;
 -  int aS = myWidgets.size();
    if (theWidgets.empty()) return;
+   bool isEnableStretch = true;
    QList<ModuleBase_ModelWidget*>::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<ModuleBase_WidgetPoint2D*>(*anIt);
 -    if (aPointWidget) {
 -      connect(aPointWidget, SIGNAL(storedPoint2D(ObjectPtr, const std::string&)),
 -              this,         SIGNAL(storedPoint2D(ObjectPtr, const std::string&)));
 +    //ModuleBase_WidgetPoint2D* aPointWidget = dynamic_cast<ModuleBase_WidgetPoint2D*>(*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<QWidget*> aControls = aLastWidget->getControls();
Simple merge