From 00b5f6dbd2ca5c4705fac595cb350b7d159f810e Mon Sep 17 00:00:00 2001 From: abn Date: Thu, 4 Aug 2016 14:43:52 +0200 Subject: [PATCH] [MEDCalc]: when component changes, scalar bar should be rescaled. --- src/MEDCalc/cmp/MEDPresentation.txx | 3 ++- src/MEDCalc/gui/PresentationController.cxx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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 } } } -- 2.39.2