From 390aea3ee689bd8a605e07fe5a8fde85bd4124f5 Mon Sep 17 00:00:00 2001 From: Vivien Delmon Date: Wed, 28 Dec 2011 14:27:46 +0100 Subject: [PATCH] BUG Don't try to change the VF color on cancel. - Test the validity of the color returned by the QColorDialog before changing the VF color. --- vv/vvOverlayPanel.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vv/vvOverlayPanel.cxx b/vv/vvOverlayPanel.cxx index 68356bf..28d8939 100644 --- a/vv/vvOverlayPanel.cxx +++ b/vv/vvOverlayPanel.cxx @@ -250,7 +250,8 @@ void vvOverlayPanel::VFColorChangeRequest() QColor color(vfColorButton->palette().color(QPalette::Background)); color = QColorDialog::getColor(color, this, "Choose the new color of the vector field"); //vfColorButton->palette().setColor(QPalette::Background, color); SR: Not working? - vfColorButton->setStyleSheet("* { background-color: " + color.name() + "; border: 0px }"); + if (color.isValid()) + vfColorButton->setStyleSheet("* { background-color: " + color.name() + "; border: 0px }"); this->setVFProperty(); } -- 2.47.1