Constructor
*/
OCCViewer_ViewManager::OCCViewer_ViewManager( SUIT_Study* study, SUIT_Desktop* theDesktop, bool DisplayTrihedron )
-: SUIT_ViewManager( study, theDesktop, new OCCViewer_Viewer( DisplayTrihedron ) )
+: SUIT_ViewManager( study, theDesktop, new OCCViewer_Viewer( DisplayTrihedron ) ),
+ myIsChainedOperations( false )
{
setTitle( tr( "OCC_VIEW_TITLE" ) );
}
// if it is necessary invoke method CreatePopup of ViewPort
// be sure that existing QPopupMenu menu is used for that.
}
+
+bool OCCViewer_ViewManager::isChainedOperations() const
+{
+ return myIsChainedOperations;
+}
+
+void OCCViewer_ViewManager::setChainedOperations( bool isChainedOperations )
+{
+ myIsChainedOperations = isChainedOperations;
+}
OCCViewer_Viewer* getOCCViewer() { return (OCCViewer_Viewer*) myViewModel; }
virtual void contextMenuPopup( QMenu* );
+
+ bool isChainedOperations() const;
+ void setChainedOperations( bool );
+
+private:
+ bool myIsChainedOperations;
};
#endif
#if OCC_VERSION_LARGE <= 0x07000000
myViewPort->getView()->ZFitAll();
#endif
- resetState();
- break;
+ {
+ OCCViewer_ViewManager* aMgr = dynamic_cast<OCCViewer_ViewManager*>( getViewManager() );
+ bool isChained = aMgr->isChainedOperations();
+ bool isReset = !( myOperation==PANVIEW && isChained ) || theEvent->button() == Qt::RightButton;
+ if( isReset )
+ resetState();
+ break;
+ }
case PANGLOBAL:
if ( theEvent->button() == Qt::LeftButton ) {