+ LightApp_Operation::abortOperation();
+ closeInputPanel();
+}
+
+void HYDROGUI_Operation::commitOperation()
+{
+ LightApp_Operation::commitOperation();
+ closeInputPanel();
+}
+
+void HYDROGUI_Operation::stopOperation()
+{
+ LightApp_Operation::stopOperation();
+
+ // pop the operation from the cached map of active operations
+ QStack<HYDROGUI_Operation*>& anOperations = myModule->getActiveOperations();
+ if ( !anOperations.empty() ) {
+ if ( anOperations.top() == this )
+ anOperations.pop();
+ else
+ {
+ // find in the stack the current operation and remove it from the stack
+ QVectorIterator<HYDROGUI_Operation*> aVIt( anOperations );
+ aVIt.toBack();
+ aVIt.previous(); // skip the top show/hide operation
+ while ( aVIt.hasPrevious() )
+ {
+ HYDROGUI_Operation* anOp = aVIt.previous();
+ if ( anOp == this )
+ anOperations.remove( anOperations.lastIndexOf( anOp ) );
+ }
+ }
+ }
+ // release the preview manager with removing the added preview Z layer
+ setPreviewManager( 0 );
+}
+
+void HYDROGUI_Operation::setDialogActive( const bool active )
+{
+ LightApp_Operation::setDialogActive( active );
+ if( myPanel )
+ {
+ if( active )
+ {
+ myPanel->show();
+ }
+ }
+}
+
+HYDROGUI_InputPanel* HYDROGUI_Operation::createInputPanel() const
+{
+ return NULL;
+}
+
+void HYDROGUI_Operation::closeInputPanel()
+{
+ if( myPanel )
+ {
+ myModule->getApp()->desktop()->removeDockWidget( myPanel );
+ delete myPanel;
+ myPanel = 0;
+ }
+}
+
+bool HYDROGUI_Operation::processApply( int& theUpdateFlags,
+ QString& theErrorMsg,
+ QStringList& theBrowseObjectsEntries )
+{
+ return false;
+}
+
+void HYDROGUI_Operation::processCancel()
+{
+}
+
+void HYDROGUI_Operation::startDocOperation()
+{
+ // Open transaction in the model document only if it not
+ // already opened by other operation (intended for nested operations)
+ if ( !doc()->IsOperation() )
+ {
+ doc()->StartOperation();
+ myIsTransactionOpened = true;
+ }
+}
+
+void HYDROGUI_Operation::abortDocOperation()
+{
+ // Abort transaction in the model document only if it was
+ // opened by this operation (intended for nested operations)
+ if ( myIsTransactionOpened && doc()->IsOperation() )
+ {
+ doc()->AbortOperation();
+ myIsTransactionOpened = false;
+ }
+}
+
+void HYDROGUI_Operation::commitDocOperation()
+{
+ // Commit transaction in the model document only if it was
+ // opened by this operation (intended for nested operations)
+ if ( myIsTransactionOpened && doc()->IsOperation() )
+ {
+ doc()->CommitOperation( HYDROGUI_Tool::ToExtString( getName() ) );
+ myIsTransactionOpened = false;
+ }