From: mzn Date: Mon, 19 Dec 2005 14:22:47 +0000 (+0000) Subject: Fix for bug PAL10966. X-Git-Tag: V3_1_0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_3_1_0deb;p=modules%2Fvisu.git Fix for bug PAL10966. --- diff --git a/src/VISUGUI/VisuGUI_ScalarBarDlg.cxx b/src/VISUGUI/VisuGUI_ScalarBarDlg.cxx index bad70b7d..0daa5bf3 100644 --- a/src/VISUGUI/VisuGUI_ScalarBarDlg.cxx +++ b/src/VISUGUI/VisuGUI_ScalarBarDlg.cxx @@ -244,7 +244,7 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent, bool SetPref): CheckGroup->layout()->setMargin( 0 ); QGridLayout* CheckGroupLayout = new QGridLayout( CheckGroup->layout() ); - myPreviewCheck = new QCheckBox(tr("LBL_SHOW_PREVIEW"), this); + myPreviewCheck = new QCheckBox(tr("LBL_SHOW_PREVIEW"), CheckGroup); myPreviewCheck->setChecked(false); CheckGroupLayout->addWidget(myPreviewCheck , 0, 0 ); @@ -601,6 +601,10 @@ void VisuGUI_ScalarBarPane::createScalarBar() if(!check()) return; + if ( myBusy ) return; + + myBusy = true; + int sbCol,sbLab; sbCol = getNbColors(); sbLab = getNbLabels(); @@ -683,11 +687,15 @@ void VisuGUI_ScalarBarPane::createScalarBar() aScalarBarActor->Modified(); VISU::GetViewWindow()->AddActor(myPreviewActor); + + myBusy = false; } /*! Deleting preview scalar bar */ void VisuGUI_ScalarBarPane::deleteScalarBar() { + if ( myBusy ) return; + if (myPreviewActor == 0) return; if (SVTK_ViewWindow* vf = VISU::GetViewWindow()){ vf->RemoveActor(myPreviewActor); diff --git a/src/VISUGUI/VisuGUI_ScalarBarDlg.h b/src/VISUGUI/VisuGUI_ScalarBarDlg.h index 33c55f96..d6da0b48 100644 --- a/src/VISUGUI/VisuGUI_ScalarBarDlg.h +++ b/src/VISUGUI/VisuGUI_ScalarBarDlg.h @@ -167,6 +167,8 @@ class VisuGUI_ScalarBarPane : public QVBox QCheckBox* myPreviewCheck; VISU_ScalarMapAct* myPreviewActor; VISU::ScalarMap_i* myScalarMap; + + bool myBusy; };