From: ouv Date: Fri, 14 Oct 2005 13:44:09 +0000 (+0000) Subject: Fixed Bug GVIEW10286 : Fatal Error after pressing of ?s? button on the keyboard X-Git-Tag: TG-D5-38-2003_D2005-20-12~159 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3bfaada8a04ced1d177921f75350932e7b07ef32;p=modules%2Fvisu.git Fixed Bug GVIEW10286 : Fatal Error after pressing of ?s? button on the keyboard --- diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 5646fd4c..b31a102d 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -623,11 +623,11 @@ void VISU_GaussPtsAct::highlight(bool theHighlight, Selection_Mode theSelectionMode) { - myTextActor->SetVisibility(0); - myCursorPyramidSelected->SetVisibility(0); - myCursorPyramid->SetVisibility(0); - myCellActor->SetVisibility(0); - GetScalarBarCtrl()->SetIsMarked(false); + myTextActor->SetVisibility(theHighlight); + myCursorPyramidSelected->SetVisibility(theHighlight); + myCursorPyramid->SetVisibility(theHighlight); + myCellActor->SetVisibility(theHighlight); + GetScalarBarCtrl()->SetIsMarked(theHighlight); GetScalarBarCtrl()->Update(); } //================================================================== @@ -637,6 +637,8 @@ VISU_GaussPtsAct::highlight(bool theHighlight, void VISU_GaussPtsAct::highlight(bool theHighlight, SVTK_Selector* theSelector) { + highlight( mySelectionMode != ActorSelection, mySelectionMode ); + TColStd_IndexedMapOfInteger aMapIndex; // theSelector->GetIndex( getIO(), aMapIndex ); @@ -677,7 +679,7 @@ void VISU_GaussPtsAct::highlight(bool theHighlight, aRadius, aNodeCoord, myHighlightProperty.GetPointer()->GetColor()); - myCursorPyramidSelected->SetVisibility(1); + //myCursorPyramidSelected->SetVisibility(1); // const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper = myGaussPointsPL->GetGaussPtsIDMapper(); diff --git a/src/OBJECT/VISU_GaussPtsSettings.cxx b/src/OBJECT/VISU_GaussPtsSettings.cxx index de9877a6..3150ed05 100644 --- a/src/OBJECT/VISU_GaussPtsSettings.cxx +++ b/src/OBJECT/VISU_GaussPtsSettings.cxx @@ -38,9 +38,15 @@ vtkStandardNewMacro( VISU_PickingSettings ); //---------------------------------------------------------------- VISU_OutsideCursorSettings::VISU_OutsideCursorSettings() { - this->Initial = true; + this->Initial = true; - this->Texture = NULL; + this->Clamp = -1; + this->Texture = NULL; + this->AlphaThreshold = -1; + this->Size = -1; + this->Color[0] = -1; + this->Color[1] = -1; + this->Color[1] = -1; } VISU_OutsideCursorSettings::~VISU_OutsideCursorSettings() @@ -51,7 +57,13 @@ VISU_OutsideCursorSettings::~VISU_OutsideCursorSettings() //---------------------------------------------------------------- VISU_PickingSettings::VISU_PickingSettings() { - this->Initial = true; + this->Initial = true; + + this->PyramidHeight = -1; + this->InfoWindowTransparency = -1; + this->InfoWindowPosition = -1; + this->ZoomFactor = -1; + this->StepNumber = -1; } VISU_PickingSettings::~VISU_PickingSettings() diff --git a/src/VVTK/VVTK_InteractorStyle.cxx b/src/VVTK/VVTK_InteractorStyle.cxx index c66ab7c2..2dcb871a 100644 --- a/src/VVTK/VVTK_InteractorStyle.cxx +++ b/src/VVTK/VVTK_InteractorStyle.cxx @@ -164,14 +164,16 @@ void VVTK_InteractorStyle ::OnKeyDown() { - + SVTK_Selector* pSelector = GetSelector(); + + if( pSelector->SelectionMode() != NodeSelection ) + return; + char key = Interactor->GetKeyCode(); if ( key == 'S' || key == 'P') { int aSMWas, x, y; - SVTK_Selector* pSelector; // - pSelector=GetSelector(); aSMWas=pSelector->SelectionMode(); // pSelector->SetSelectionMode(NodeSelection);