From 738107919dc9a056d679e75be0760e3eeae3dd4a Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Thu, 17 Nov 2011 13:06:59 +0100 Subject: [PATCH] Corrected bug with button All: W/L was read from spin box which resolution is limited by text --- vv/vvMainWindow.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 6bd2d79..a7c61a9 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -1720,11 +1720,16 @@ void vvMainWindow::SwitchWindowLevel() //------------------------------------------------------------------------------ void vvMainWindow::ApplyWindowLevelToAllImages() { + int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]); + if(index==-1) return; + double window = mSlicerManagers[index]->GetColorWindow(); + double level = mSlicerManagers[index]->GetColorLevel(); + for (unsigned int i = 0; i < mSlicerManagers.size(); i++) { if (mSlicerManagers[i] == NULL) continue; - mSlicerManagers[i]->SetColorWindow(windowSpinBox->value()); - mSlicerManagers[i]->SetColorLevel(levelSpinBox->value()); + mSlicerManagers[i]->SetColorWindow(window); + mSlicerManagers[i]->SetColorLevel(level); mSlicerManagers[i]->SetPreset(6); mSlicerManagers[i]->Render(); } -- 2.47.1