Salome HOME
Improve calculation of size of preferences panel.
[modules/shaper.git] / src / XGUI / XGUI_PropertyPanel.cpp
index 3860a9ff1af1bad55f3132d648b8547ca594e44b..0099869f50e86fd6cc92f88e407822eabf49d33e 100644 (file)
@@ -225,8 +225,11 @@ void XGUI_PropertyPanel::createContentPanel(FeaturePtr theFeature)
     QString aXmlRepr = anOperation->getDescription()->xmlRepresentation();
 
     ModuleBase_WidgetFactory aFactory(aXmlRepr.toStdString(), myOperationMgr->workshop());
-    aFactory.createPanel(contentWidget(), theFeature);
-    /// Apply button should be update if the feature was modified by the panel
+    ModuleBase_PageBase* aPage = contentWidget();
+    aFactory.createPanel(aPage, theFeature);
+    // update model widgets if exist
+    setModelWidgets(aPage->modelWidgets());
+    // Apply button should be update if the feature was modified by the panel
     myOperationMgr->onValidateOperation();
   }
   ModuleBase_OperationFeature* aFeatureOp =
@@ -478,7 +481,7 @@ bool XGUI_PropertyPanel::focusNextPrevChild(bool theIsNext)
     ModuleBase_ModelWidget* aNewFocusMWidget = ModuleBase_ModelWidget::findModelWidget(this,
                                                                               aNewFocusWidget);
     if (aNewFocusMWidget) {
-      if (aFocusMWidget) {
+      if (aFocusMWidget && (aFocusMWidget != aNewFocusMWidget)) {
         aFocusMWidget->setHighlighted(false);
       }
       aNewFocusMWidget->emitFocusInWidget();