#include <ModuleBase_Operation.h>
#include <ModuleBase_OperationDescription.h>
#include <ModuleBase_SelectionValidator.h>
+#include <ModuleBase_ResultValidators.h>
#include <Config_Common.h>
#include <Config_FeatureMessage.h>
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
+ registerValidators();
activateModule();
if (myMainWindow) {
myMainWindow->show();
aCommand = aMenu->feature(theOperation->getDescription()->operationId());
}
//Abort operation on uncheck the command
- connect(aCommand, SIGNAL(triggered(bool)), theOperation, SLOT(setRunning(bool)));
+ if (aCommand)
+ connect(aCommand, SIGNAL(triggered(bool)), theOperation, SLOT(setRunning(bool)));
}
/*
aObjDock->setWindowTitle(tr("Object browser"));
aObjDock->setStyleSheet("::title { position: relative; padding-left: 5px; text-align: left center }");
myObjectBrowser = new XGUI_ObjectsBrowser(aObjDock);
- connect(myObjectBrowser, SIGNAL(activePartChanged(FeaturePtr)), this, SLOT(changeCurrentDocument(FeaturePtr)));
+ connect(myObjectBrowser, SIGNAL(activePartChanged(ObjectPtr)), this, SLOT(changeCurrentDocument(ObjectPtr)));
aObjDock->setWidget(myObjectBrowser);
myContextMenuMgr->connectObjectBrowser();
}
}
}
+
+
+//**************************************************************
+void XGUI_Workshop::registerValidators() const
+{
+ PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
+ ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
+
+ aFactory->registerValidator("ModuleBase_ResulPointValidator", new ModuleBase_ResulPointValidator);
+ aFactory->registerValidator("ModuleBase_ResulLineValidator", new ModuleBase_ResulLineValidator);
+ aFactory->registerValidator("ModuleBase_ResulArcValidator", new ModuleBase_ResulArcValidator);
+}