salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT");
- aAction = salomeConnector()->addDesktopCommand("AUTOCOMPUTE_CMD", tr("Auto rebuild"),
- tr("Blocks immediate apply of modifications"),
- QIcon(":pictures/autoapply.png"), QKeySequence(),
- false, "MEN_DESK_EDIT");
- salomeConnector()->addActionInToolbar( aAction, aToolBarTitle );
+ //aAction = salomeConnector()->addDesktopCommand("AUTOCOMPUTE_CMD", tr("Auto rebuild"),
+ // tr("Blocks immediate apply of modifications"),
+ // QIcon(":pictures/autoapply.png"), QKeySequence(),
+ // false, "MEN_DESK_EDIT");
+ //salomeConnector()->addActionInToolbar( aAction, aToolBarTitle );
- connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onAutoApply()));
+ //connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onAutoApply()));
salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT");
aCommand->connectTo(this, SLOT(onOpen()));
- aCommand = aGroup->addFeature("AUTOCOMPUTE_CMD", tr("Auto rebuild"),
- tr("Blocks immediate apply of modifications"),
- QIcon(":pictures/autoapply_start.png"), QKeySequence());
+ //aCommand = aGroup->addFeature("AUTOCOMPUTE_CMD", tr("Auto rebuild"),
+ // tr("Blocks immediate apply of modifications"),
+ // QIcon(":pictures/autoapply_start.png"), QKeySequence());
//aCommand->setChecked(ModelAPI_Session::get()->isAutoUpdateBlocked());
- aCommand->connectTo(this, SLOT(onAutoApply()));
+ //aCommand->connectTo(this, SLOT(onAutoApply()));
aCommand = aGroup->addFeature("PREF_CMD", tr("Preferences"), tr("Edit preferences"),
QIcon(":pictures/preferences.png"), QKeySequence::Preferences);
else
aCmd->setEnabled(myModule->canRedo());
}
- else if (aId == "AUTOCOMPUTE_CMD") {
- //aCmd->setChecked(aMgr->isAutoUpdateBlocked());
- aCmd->setIcon(aMgr->isAutoUpdateBlocked() ?
- QIcon(":pictures/autoapply_stop.png") :
- QIcon(":pictures/autoapply_start.png"));
- }
+ //else if (aId == "AUTOCOMPUTE_CMD") {
+ // aCmd->setIcon(aMgr->isAutoUpdateBlocked() ?
+ // QIcon(":pictures/autoapply_stop.png") :
+ // QIcon(":pictures/autoapply_start.png"));
+ //}
else
// Enable all commands
aCmd->setEnabled(true);
aMgr->blockAutoUpdate(!isBlocked);
}
-void XGUI_Workshop::updateAutoComputeState()
-{
- SessionPtr aMgr = ModelAPI_Session::get();
- bool isComputeBlocked = aMgr->isAutoUpdateBlocked();
-#ifdef HAVE_SALOME
- QAction* aUpdateCmd;
- QList<QAction*> aCommands = mySalomeConnector->commandList();
- foreach(QAction* aCmd, aCommands) {
- if (aCmd->data().toString() == "AUTOCOMPUTE_CMD") {
- aUpdateCmd = aCmd;
- break;
- }
- }
- aUpdateCmd->setIcon(isComputeBlocked? QIcon(":pictures/autoapply_stop.png") :
- QIcon(":pictures/autoapply_start.png"));
-#else
- AppElements_MainMenu* aMenuBar = myMainWindow->menuObject();
- AppElements_Command* aUpdateCmd = aMenuBar->feature("AUTOCOMPUTE_CMD");
- aUpdateCmd->button()->setIcon(isComputeBlocked? QIcon(":pictures/autoapply_stop.png") :
- QIcon(":pictures/autoapply_start.png"));
-#endif
-}
+//void XGUI_Workshop::updateAutoComputeState()
+//{
+// SessionPtr aMgr = ModelAPI_Session::get();
+// bool isComputeBlocked = aMgr->isAutoUpdateBlocked();
+//#ifdef HAVE_SALOME
+// QAction* aUpdateCmd;
+// QList<QAction*> aCommands = mySalomeConnector->commandList();
+// foreach(QAction* aCmd, aCommands) {
+// if (aCmd->data().toString() == "AUTOCOMPUTE_CMD") {
+// aUpdateCmd = aCmd;
+// break;
+// }
+// }
+// aUpdateCmd->setIcon(isComputeBlocked? QIcon(":pictures/autoapply_stop.png") :
+// QIcon(":pictures/autoapply_start.png"));
+//#else
+// AppElements_MainMenu* aMenuBar = myMainWindow->menuObject();
+// AppElements_Command* aUpdateCmd = aMenuBar->feature("AUTOCOMPUTE_CMD");
+// aUpdateCmd->button()->setIcon(isComputeBlocked? QIcon(":pictures/autoapply_stop.png") :
+// QIcon(":pictures/autoapply_start.png"));
+//#endif
+//}
void XGUI_Workshop::clearTemporaryDir()
aLoop->registerListener(this, Events_Loop::eventByName("FinishOperation"));
aLoop->registerListener(this, Events_Loop::eventByName("AbortOperation"));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_ENABLE));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_DISABLE));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_ENABLE));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_DISABLE));
}
//******************************************************
// the viewer's update context is unblocked, the viewer's update works
XGUI_Displayer* aDisplayer = workshop()->displayer();
aDisplayer->enableUpdateViewer(true);
- } else if ((theMessage->eventID() ==
- Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_ENABLE)) ||
- (theMessage->eventID() ==
- Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_DISABLE))) {
- myWorkshop->updateAutoComputeState();
+ //} else if ((theMessage->eventID() ==
+ // Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_ENABLE)) ||
+ // (theMessage->eventID() ==
+ // Events_Loop::eventByName(EVENT_AUTOMATIC_RECOMPUTATION_DISABLE))) {
+ // myWorkshop->updateAutoComputeState();
} else {
//Show error dialog if error message received.
std::shared_ptr<Events_InfoMessage> anIngfoMsg =