From: abn Date: Thu, 4 Aug 2016 12:43:52 +0000 (+0200) Subject: [MEDCalc]: when component changes, scalar bar should be rescaled. X-Git-Tag: V8_1_0b1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=00b5f6dbd2ca5c4705fac595cb350b7d159f810e;p=modules%2Fmed.git [MEDCalc]: when component changes, scalar bar should be rescaled. --- diff --git a/src/MEDCalc/cmp/MEDPresentation.txx b/src/MEDCalc/cmp/MEDPresentation.txx index 59b09181c..84b4137c4 100644 --- a/src/MEDCalc/cmp/MEDPresentation.txx +++ b/src/MEDCalc/cmp/MEDPresentation.txx @@ -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 diff --git a/src/MEDCalc/gui/PresentationController.cxx b/src/MEDCalc/gui/PresentationController.cxx index c6fcbbe78..fe19f432e 100644 --- a/src/MEDCalc/gui/PresentationController.cxx +++ b/src/MEDCalc/gui/PresentationController.cxx @@ -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 } } }