Salome HOME
correct merge BR_hydro_v1_0_3 on BR_quadtree
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_CalculationOp.cxx
index 71f47ea772995f6a2441a8a4987af21af80bf8fb..f3b4351c607bce16219f2ef9ff3731a3ef84cdce 100644 (file)
@@ -296,13 +296,13 @@ void HYDROGUI_CalculationOp::onObjectsSelected()
         aName = anEntity->GetName();
         isSelected = aSelectedObjsMap.contains( aName );
         aShape->highlight( isSelected, false );
-        aShape->update( false );
+        aShape->update( false, false );
         aLastShape = aShape;
       }
     }
   }
   if( aLastShape )
-    aLastShape->update( true );
+    aLastShape->update( true, false );
 }
 
 void HYDROGUI_CalculationOp::onClickedInZonesBrowser( SUIT_DataObject* theItem )
@@ -407,7 +407,7 @@ void HYDROGUI_CalculationOp::onSetMergeType( int theMergeType, QString& theAltit
       HYDROGUI_Shape* aShape = module()->getObjectShape( HYDROGUI_Module::VMR_PreviewCaseZones, aZone->modelObject() );
       if ( aShape )
       {
-        aShape->update();
+        aShape->update( true, false );
       }
     }
     aPanel->refreshZonesBrowser();
@@ -498,13 +498,20 @@ bool HYDROGUI_CalculationOp::confirmRegionsChange() const
 }
 
 bool HYDROGUI_CalculationOp::processApply( int&     theUpdateFlags,
-                                           QString& theErrorMsg )
+                                           QString& theErrorMsg,
+                                           QStringList& theBrowseObjectsEntries )
 {
   HYDROGUI_CalculationDlg* aPanel = 
     ::qobject_cast<HYDROGUI_CalculationDlg*>( inputPanel() );
   if ( !aPanel )
     return false;
 
+  if( !myIsEdit )
+  {
+    QString anEntry = HYDROGUI_DataObject::dataObjectEntry( myEditedObject );
+    theBrowseObjectsEntries.append( anEntry );
+  }
+
   theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced | UF_VTKViewer | UF_VTK_Forced | UF_VTK_Init;
 
   return true;
@@ -516,12 +523,13 @@ void HYDROGUI_CalculationOp::onApply()
 
   int anUpdateFlags = 0;
   QString anErrorMsg;
+  QStringList aBrowseObjectsEntries;
 
   bool aResult = false;
   
   try
   {
-    aResult = processApply( anUpdateFlags, anErrorMsg );
+    aResult = processApply( anUpdateFlags, anErrorMsg, aBrowseObjectsEntries );
   }
   catch ( Standard_Failure )
   {
@@ -540,6 +548,7 @@ void HYDROGUI_CalculationOp::onApply()
   {
     module()->update( anUpdateFlags );
     commit();
+    browseObjects( aBrowseObjectsEntries );
   }
   else
   {