void OCCViewer_ViewWindow::onPanning()
{
- myPanningByBtn = true;
- activatePanning();
+ OCCViewer_ViewManager* aMgr = dynamic_cast<OCCViewer_ViewManager*>( getViewManager() );
+ bool isChained = aMgr->isChainedOperations();
+ bool isReset = ( myPanningByBtn && isChained );
+ if( isReset )
+ {
+ resetState();
+ }
+ else
+ {
+ myPanningByBtn = true;
+ activatePanning();
+ }
}
/*!
setTransformInProcess( false );
setTransformRequested( NOTHING );
+
+ myPanningByBtn = false;
}