From f20bada9ca6aace48799090e1d5bf91ef6326603 Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Fri, 3 Feb 2012 07:57:12 +0100 Subject: [PATCH] Correct bug when the user cancel the color selection --- vv/vvToolROIManager.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vv/vvToolROIManager.cxx b/vv/vvToolROIManager.cxx index 645941c..e1d2e5c 100644 --- a/vv/vvToolROIManager.cxx +++ b/vv/vvToolROIManager.cxx @@ -677,6 +677,8 @@ void vvToolROIManager::ChangeColor() { mCurrentROIActor->GetROI()->GetDisplayColor()[1], mCurrentROIActor->GetROI()->GetDisplayColor()[2]); QColor c = QColorDialog::getColor(color, this, "Choose the ROI color"); + if (!c.isValid()) return;// User cancel + mCurrentROIActor->GetROI()->SetDisplayColor(c.redF(), c.greenF(), c.blueF()); mCurrentROIActor->UpdateColor(); -- 2.47.1