Salome HOME
refs #1376: now in the popup menu Show/Hide arrows are available always
authorasl <asl@opencascade.com>
Tue, 7 Nov 2017 12:17:31 +0000 (15:17 +0300)
committerasl <asl@opencascade.com>
Tue, 7 Nov 2017 12:17:31 +0000 (15:17 +0300)
src/HYDROGUI/HYDROGUI_Module.cxx
src/HYDROGUI/HYDROGUI_Operations.cxx

index ce1b778381cd9c96019265d983d66f58a697c0f1..3a3d2b642aa51a645537b710c5f555b7a8b54097 100644 (file)
@@ -821,14 +821,10 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
     }
   }
 
-  bool isPoly = anIsPolyline || anIsPolyline3D;
-  if( isPoly )
-  {
-    theMenu->addSeparator();
-    QAction* a = action( ShowHideArrows );
-    a->setText( arrowsVisible() ? tr( "HIDE_ARROWS" ) : tr( "SHOW_ARROWS" ) );
-    theMenu->addAction( a );
-  }
+  theMenu->addSeparator();
+  QAction* a = action( ShowHideArrows );
+  a->setText( arrowsVisible() ? tr( "HIDE_ARROWS" ) : tr( "SHOW_ARROWS" ) );
+  theMenu->addAction( a );
 }
 
 void HYDROGUI_Module::createPreferences()
index eaaebfbc9ec8e7ebe56ebc2ef4a76c0caaf9ce59..8909b8759b28724c4019358963bd045f63506d2e 100644 (file)
@@ -486,6 +486,9 @@ void HYDROGUI_Module::setArrowsVisible( bool isVisible )
   {
     if( resMgr->hasValue( "polyline", "prev_arrow_type" ) )
       resMgr->value( "polyline", "prev_arrow_type", aType );
+
+    if( aType<=0 )
+      aType = 1;
     resMgr->setValue( "polyline", "arrow_type", aType );
   }
   else