From: asl Date: Wed, 20 May 2015 13:55:09 +0000 (+0300) Subject: Merge remote-tracking branch 'origin/BR_IMPROVEMENTS' into BR_v14_rc X-Git-Tag: v1.4.1~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=439579ec24edd8b147cab07f688d446d59029a1e;p=modules%2Fhydro.git Merge remote-tracking branch 'origin/BR_IMPROVEMENTS' into BR_v14_rc Conflicts: src/HYDROGUI/HYDROGUI_ImportImageOp.cxx src/HYDROGUI/HYDROGUI_Operation.cxx --- 439579ec24edd8b147cab07f688d446d59029a1e diff --cc src/HYDROGUI/HYDROGUI_ImportImageOp.cxx index 6d661e9a,a7f9e98c..a3d2c72e --- a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx @@@ -502,15 -507,10 +505,18 @@@ bool HYDROGUI_ImportImageOp::processApp anImageObj->Update(); - theUpdateFlags = UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced; + theUpdateFlags = UF_Model; + if ( isApplyAndClose() ) + theUpdateFlags |= UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced; + + + if( SetNextFile() ) + { + theErrorMsg = ""; + commitDocOperation(); // to save the modifications in the data model + return false; // and to continue the operation + } + return true; } diff --cc src/HYDROGUI/HYDROGUI_Module.cxx index caad11e4,3c752c29..1ed020f8 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@@ -700,23 -710,48 +706,60 @@@ void HYDROGUI_Module::contextMenuPopup if( isRoot ) theMenu->addAction( action( EditLocalCSId ) ); + + if( anIsObjectBrowser && anOwners.size()==1 ) + { + Handle( HYDROData_Object ) anObject = Handle( HYDROData_Object )::DownCast( aSeq.First() ); + if( !anObject.IsNull() ) + { + theMenu->addSeparator(); + theMenu->addAction( action( SubmersibleId ) ); + action( SubmersibleId )->setCheckable( true ); + action( SubmersibleId )->setChecked( anObject->IsSubmersible() ); + } + } } + void HYDROGUI_Module::createPreferences() + { + int genTab = addPreference( tr( "PREF_TAB_GENERAL" ) ); + int CursorGroup = addPreference( tr( "PREF_GROUP_CURSOR" ), genTab ); + + int typeOfCursor = addPreference( tr( "PREF_TYPE_OF_CURSOR" ), CursorGroup, + LightApp_Preferences::Selector, "preferences", "type_of_cursor" ); + + // Set property cursor type + QList aCursorTypeIndicesList; + QList aCursorTypeIconsList; + + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + for ( int i = CT_ArrowCursor; i < CT_User; i++ ) { + QString icoFile = QString( "ICON_CURSOR_%1" ).arg( i+1 ); + QPixmap pixmap = resMgr->loadPixmap( "HYDRO", tr( qPrintable( icoFile ) ) ); + aCursorTypeIndicesList << i; + aCursorTypeIconsList << pixmap; + } + + setPreferenceProperty( typeOfCursor, "indexes", aCursorTypeIndicesList ); + setPreferenceProperty( typeOfCursor, "icons", aCursorTypeIconsList ); + + int viewerGroup = addPreference( tr( "PREF_GROUP_VIEWER" ), genTab ); + addPreference( tr( "PREF_VIEWER_AUTO_FITALL" ), viewerGroup, + LightApp_Preferences::Bool, "HYDRO", "auto_fit_all" ); + } + + QCursor HYDROGUI_Module::getPrefEditCursor() const + { + int aCursorType = SUIT_Session::session()->resourceMgr()->integerValue("preferences", "type_of_cursor", (int)CT_CrossCursor ); + if ( aCursorType >= Qt::BlankCursor) + aCursorType++; + QCursor aCursor = QCursor( Qt::CursorShape(aCursorType) ); + return aCursor; + } + void HYDROGUI_Module::update( const int flags ) { - if( !isUpdateEnabled() ) + if ( !isUpdateEnabled() ) return; QApplication::setOverrideCursor( Qt::WaitCursor );