]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Seocnd fix on Bug GVIEW10215
authorapo <apo@opencascade.com>
Wed, 12 Oct 2005 11:50:55 +0000 (11:50 +0000)
committerapo <apo@opencascade.com>
Wed, 12 Oct 2005 11:50:55 +0000 (11:50 +0000)
 Group creation - incorrect selection

src/SVTK/SALOME_Actor.cxx

index 409b45d9a7958385beaa2f74a48a14c768202daf..51528c5aab7d4c29fa71c991d7a3736d3da0e269 100644 (file)
@@ -771,8 +771,7 @@ SALOME_Actor
     
   bool anIsChanged = (mySelectionMode != theSelectionEvent->mySelectionMode);
 
-  mySelectionMode = theSelectionEvent->mySelectionMode;
-
+  Selection_Mode aSelectionMode = theSelectionEvent->mySelectionMode;
   float x = theSelectionEvent->myX;
   float y = theSelectionEvent->myY;
   float z = 0.0;
@@ -821,7 +820,7 @@ SALOME_Actor
       if ( aVtkId >= 0 && theSelector->IsValid( this, aVtkId ) && hasIO() ) {
        int anObjId = GetElemObjId (aVtkId );
        if ( anObjId >= 0 ) {
-         if ( CheckDimensionId(mySelectionMode,this,anObjId) ) {
+         if ( CheckDimensionId(aSelectionMode,this,anObjId) ) {
            TColStd_IndexedMapOfInteger aMapIndex;
            aMapIndex.Add( anObjId );
            
@@ -880,6 +879,8 @@ SALOME_Actor
     }
   }
 
+  mySelectionMode = aSelectionMode;
+
   return anIsChanged;
 }
 
@@ -939,7 +940,7 @@ SALOME_Actor
       if( aVtkId >= 0 && theSelector->IsValid( this, aVtkId ) ) {
        int anObjId = GetElemObjId( aVtkId );
        if( anObjId >= 0 ) {
-         if ( CheckDimensionId(mySelectionMode,this,anObjId) ) {
+         if ( CheckDimensionId(aSelectionMode,this,anObjId) ) {
            if( theSelector->IsSelected( myIO ) )
              theSelector->AddOrRemoveIndex( myIO, anObjId, isShift );
            else {
@@ -1059,7 +1060,7 @@ SALOME_Actor
 
          int anObjId = GetElemObjId( aCellId );
          if( anObjId != -1 )
-           if ( CheckDimensionId(mySelectionMode,this,anObjId) ) {
+           if ( CheckDimensionId(aSelectionMode,this,anObjId) ) {
              anIndexes.Add(anObjId);
            }
        }