]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
[MEDCalc]: when component changes, scalar bar should be rescaled.
authorabn <adrien.bruneton@cea.fr>
Thu, 4 Aug 2016 12:43:52 +0000 (14:43 +0200)
committerabn <adrien.bruneton@cea.fr>
Thu, 4 Aug 2016 12:43:52 +0000 (14:43 +0200)
src/MEDCalc/cmp/MEDPresentation.txx
src/MEDCalc/gui/PresentationController.cxx

index 59b09181c3c0d4acad60ac8de0c61c5227316736..84b4137c4b55dee3d2421171cd294594dc0f6979 100644 (file)
@@ -90,9 +90,10 @@ MEDPresentation::updateComponent(const std::string& newCompo)
 
     std::ostringstream oss;
     selectFieldComponent();
+    // The component has changed, we need to rescale the scalar bar to adapt:
+    rescaleTransferFunction();
     pushAndExecPyLine("pvs.Render();");
   }
-
 }
 
 template<typename PresentationType, typename PresentationParameters>
index c6fcbbe78966cc13ba876f9a8a3b08e1c2bfafda..fe19f432e5bcf20d9862fb08e3d7a854d804409f 100644 (file)
@@ -743,6 +743,7 @@ PresentationController::processWorkspaceEvent(const MEDCALC::MedEvent* event)
             STDLOG("Removing pres " << (*lstModule)[i] << " from OB.");
           // Presentation in module but not in manager anymore: to be deleted from OB:
           updateTreeViewForPresentationRemoval((*lstModule)[i]);
+          onPresentationSelected(-1, "", ""); // make sure param widget is hidden
           }
       }
   }