From: asl Date: Tue, 7 Nov 2017 12:17:31 +0000 (+0300) Subject: refs #1376: now in the popup menu Show/Hide arrows are available always X-Git-Tag: v2.1~59 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=77396ccfa6d8d3666005deafec6c55b929d59281;p=modules%2Fhydro.git refs #1376: now in the popup menu Show/Hide arrows are available always --- diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index ce1b7783..3a3d2b64 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -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() diff --git a/src/HYDROGUI/HYDROGUI_Operations.cxx b/src/HYDROGUI/HYDROGUI_Operations.cxx index eaaebfbc..8909b875 100644 --- a/src/HYDROGUI/HYDROGUI_Operations.cxx +++ b/src/HYDROGUI/HYDROGUI_Operations.cxx @@ -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