From 77396ccfa6d8d3666005deafec6c55b929d59281 Mon Sep 17 00:00:00 2001 From: asl Date: Tue, 7 Nov 2017 15:17:31 +0300 Subject: [PATCH] refs #1376: now in the popup menu Show/Hide arrows are available always --- src/HYDROGUI/HYDROGUI_Module.cxx | 12 ++++-------- src/HYDROGUI/HYDROGUI_Operations.cxx | 3 +++ 2 files changed, 7 insertions(+), 8 deletions(-) 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 -- 2.39.2