]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fixed Bug GVIEW10286 : Fatal Error after pressing of ?s? button on the keyboard
authorouv <ouv@opencascade.com>
Fri, 14 Oct 2005 13:44:09 +0000 (13:44 +0000)
committerouv <ouv@opencascade.com>
Fri, 14 Oct 2005 13:44:09 +0000 (13:44 +0000)
src/OBJECT/VISU_GaussPtsAct.cxx
src/OBJECT/VISU_GaussPtsSettings.cxx
src/VVTK/VVTK_InteractorStyle.cxx

index 5646fd4cdadf73dc2b1402ab2c16cf8131c16e44..b31a102d1cfd07da645fe9a7f06d784fc50b36fd 100644 (file)
@@ -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();
index de9877a6a6b3782f6869480f741ba36043709fa3..3150ed052c0cc9de95d3a7f5f020d3ecc4751741 100644 (file)
@@ -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()
index c66ab7c2c8a4debfaeab8bf992a3475d8cc9ed1d..2dcb871a0a25a8682d2faf881ac868573d5dfb7b 100644 (file)
@@ -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);