XGUI_Workshop* aWorkshop = aConnector->workshop();
XGUI_OperationMgr* anOpMgr = aWorkshop->operationMgr();
- connect(anOpMgr, SIGNAL(keyEnterReleased()), this, SLOT(onEnterReleased()));
connect(anOpMgr, SIGNAL(operationActivatedByPreselection()),
this, SLOT(onOperationActivatedByPreselection()));
void PartSet_Module::onOperationStarted(ModuleBase_Operation* theOperation)
{
+ /// Restart sketcher operations automatically
+ mySketchReentrantMgr->operationStarted(theOperation);
+
if (PartSet_SketcherMgr::isSketchOperation(theOperation)) {
mySketchMgr->startSketch(theOperation);
}
void PartSet_Module::propertyPanelDefined(ModuleBase_Operation* theOperation)
{
- mySketchReentrantMgr->propertyPanelDefined(theOperation);
+ ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
+ if (!aFOperation)
+ return;
+
+ ModuleBase_IPropertyPanel* aPanel = aFOperation->propertyPanel();
+ // we have to manually activate the sketch label in edit mode
+ if (PartSet_SketcherMgr::isSketchOperation(aFOperation) && (aFOperation->isEditOperation()))
+ aPanel->activateWidget(aPanel->modelWidgets().first());
}
anOpMgr->onKeyReleased(theEvent);
}
-void PartSet_Module::onEnterReleased()
-{
- mySketchReentrantMgr->enterReleased();
-}
-
void PartSet_Module::onOperationActivatedByPreselection()
{
if (!mySketchReentrantMgr->canBeCommittedByPreselection())
{
ModuleBase_ModelWidget* anActiveWidget = 0;
- anActiveWidget = mySketchReentrantMgr->activeWidget();
+ anActiveWidget = mySketchReentrantMgr->internalActiveWidget();
if (!anActiveWidget) {
ModuleBase_Operation* aOperation = myWorkshop->currentOperation();
if (aOperation) {