(anOperationMgr->currentOperation());
if (aFOperation) {
//if (errorMgr()->canProcessClick(anAction, aFOperation->feature()))
- myOperationMgr->commitOperation();
+ myOperationMgr->onCommitOperation();
}
}
}
QApplication::restoreOverrideCursor();
}
+//******************************************************
+bool XGUI_Workshop::abortAllOperations()
+{
+ return myOperationMgr->abortAllOperations();
+}
+
//******************************************************
void XGUI_Workshop::operationStarted(ModuleBase_Operation* theOperation)
{
//******************************************************
void XGUI_Workshop::onOpen()
{
- if(!myOperationMgr->abortAllOperations())
+ if(!abortAllOperations())
return;
//save current file before close if modified
SessionPtr aSession = ModelAPI_Session::get();
//******************************************************
bool XGUI_Workshop::onSave()
{
- if(!myOperationMgr->abortAllOperations(XGUI_OperationMgr::XGUI_InformationMessage))
+ if(!abortAllOperations())
return false;
if (myCurrentDir.isEmpty()) {
return onSaveAs();
//******************************************************
bool XGUI_Workshop::onSaveAs()
{
- if(!myOperationMgr->abortAllOperations(XGUI_OperationMgr::XGUI_InformationMessage))
+ if(!abortAllOperations())
return false;
QFileDialog dialog(desktop());
dialog.setWindowTitle(tr("Select directory to save files..."));
#endif
aParameters.Append(MyVCallBack);
- MyTCommunicator->registerPlugin("SMBrowser"); // custom plugin to view ModelAPI
+ MyTCommunicator->RegisterPlugin("SMBrowser"); // custom plugin to view ModelAPI
- MyTCommunicator->init(aParameters);
+ MyTCommunicator->Init(aParameters);
MyTCommunicator->Activate("SMBrowser"); // to have button in TInspector
MyTCommunicator->Activate("TKVInspector"); // to have filled callback by model
MyTCommunicator->Activate("TKDFBrowser");
}
- MyTCommunicator->setVisible(true);
+ MyTCommunicator->SetVisible(true);
}
}
#endif
}
QObjectPtrList anObjects = mySelector->selection()->selectedObjects();
- if (!myOperationMgr->abortAllOperations())
+ if (!abortAllOperations())
return;
bool hasResult = false;
//**************************************************************
void XGUI_Workshop::cleanHistory()
{
- if (!myOperationMgr->abortAllOperations())
+ if (!abortAllOperations())
return;
QObjectPtrList anObjects = mySelector->selection()->selectedObjects();
//**************************************************************
void XGUI_Workshop::moveObjects()
{
- if (!myOperationMgr->abortAllOperations())
+ if (!abortAllOperations())
return;
SessionPtr aMgr = ModelAPI_Session::get();
if (aColor.size() != 3)
return;
- if (!myOperationMgr->abortAllOperations())
+ if (!abortAllOperations())
return;
// 2. show the dialog to change the value
XGUI_ColorDialog* aDlg = new XGUI_ColorDialog(desktop());
if (aDeflection < 0)
return;
- if (!myOperationMgr->abortAllOperations())
+ if (!abortAllOperations())
return;
// 2. show the dialog to change the value
XGUI_DeflectionDialog* aDlg = new XGUI_DeflectionDialog(desktop());