1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: XGUI_OperationMgr.cpp
4 // Created: 20 Apr 2014
5 // Author: Natalia ERMOLAEVA
7 #include "XGUI_OperationMgr.h"
8 #include "XGUI_ModuleConnector.h"
9 #include "XGUI_Workshop.h"
10 #include "XGUI_ErrorMgr.h"
11 #include "XGUI_Tools.h"
12 #include "XGUI_ObjectsBrowser.h"
13 #include "XGUI_ContextMenuMgr.h"
15 #include <ModuleBase_IPropertyPanel.h>
16 #include <ModuleBase_ModelWidget.h>
17 #include "ModuleBase_Operation.h"
18 #include "ModuleBase_IWorkshop.h"
19 #include "ModuleBase_IModule.h"
20 #include <ModuleBase_IViewer.h>
21 #include "ModuleBase_OperationDescription.h"
22 #include "ModuleBase_OperationFeature.h"
23 #include "ModuleBase_Tools.h"
25 #include "ModelAPI_CompositeFeature.h"
26 #include "ModelAPI_Session.h"
28 #include <XGUI_PropertyPanel.h>
29 #include <QToolButton>
32 #include <QMessageBox>
33 #include <QApplication>
36 //#define DEBUG_CURRENT_FEATURE
38 /// Processes "Delete" key event of application. This key is used by several application actions.
39 /// There is a logical order of the actions processing. So the key can not be set for actions
40 /// as a shortcut. The class listens the key event and call operation manager processor.
41 class XGUI_ShortCutListener : public QObject
45 /// \param theParent the parent to be deleted when the parent is deleted
46 /// \param theOperationMgr the class to perform deletion
47 XGUI_ShortCutListener(QObject* theParent, XGUI_OperationMgr* theOperationMgr)
48 : QObject(theParent), myOperationMgr(theOperationMgr)
50 qApp->installEventFilter(this);
52 ~XGUI_ShortCutListener() {}
54 /// Switch on short cut listener
55 void setActive(const bool theIsActive) { myIsActive = theIsActive; }
57 /// Redefinition of virtual function to process Delete key release
58 virtual bool eventFilter(QObject *theObject, QEvent *theEvent)
60 bool isAccepted = false;
61 if (myIsActive && theEvent->type() == QEvent::KeyRelease) {
62 QKeyEvent* aKeyEvent = dynamic_cast<QKeyEvent*>(theEvent);
64 switch (aKeyEvent->key()) {
66 isAccepted = myOperationMgr->onProcessDelete(theObject);
69 myOperationMgr->onKeyReleased(theObject, aKeyEvent);
76 isAccepted = QObject::eventFilter(theObject, theEvent);
81 XGUI_OperationMgr* myOperationMgr; /// processor for key event
82 bool myIsActive; /// boolean state whether the event filter perform own signal processing
85 XGUI_OperationMgr::XGUI_OperationMgr(QObject* theParent,
86 ModuleBase_IWorkshop* theWorkshop)
87 : QObject(theParent), myWorkshop(theWorkshop)
89 /// we need to install filter to the application in order to react to 'Delete' key button
90 /// this key can not be a short cut for a corresponded action because we need to set
91 /// the actions priority
92 myShortCutListener = new XGUI_ShortCutListener(theParent, this);
95 XGUI_OperationMgr::~XGUI_OperationMgr()
99 void XGUI_OperationMgr::activate()
101 myShortCutListener->setActive(true);
104 void XGUI_OperationMgr::deactivate()
106 myShortCutListener->setActive(false);
109 ModuleBase_Operation* XGUI_OperationMgr::currentOperation() const
111 return myOperations.count() > 0 ? myOperations.last() : 0;
114 bool XGUI_OperationMgr::isCurrentOperation(ModuleBase_Operation* theOperation)
118 return currentOperation() == theOperation;
121 bool XGUI_OperationMgr::hasOperation() const
123 return !myOperations.isEmpty() && (myOperations.last() != NULL);
126 bool XGUI_OperationMgr::hasOperation(const QString& theId) const
128 foreach(ModuleBase_Operation* aOp, myOperations) {
129 if (aOp->id() == theId)
135 ModuleBase_Operation* XGUI_OperationMgr::findOperation(const QString& theId) const
137 QList<ModuleBase_Operation*>::const_iterator anIt = myOperations.end();
138 while (anIt != myOperations.begin()) {
140 ModuleBase_Operation* anOperation = *anIt;
141 if (anOperation->id() == theId)
148 int XGUI_OperationMgr::operationsCount() const
150 return myOperations.count();
153 QStringList XGUI_OperationMgr::operationList() const
156 foreach(ModuleBase_Operation* eachOperation, myOperations) {
157 ModuleBase_OperationFeature* aFOperation =
158 dynamic_cast<ModuleBase_OperationFeature*>(eachOperation);
160 FeaturePtr aFeature = aFOperation->feature();
162 result << QString::fromStdString(aFeature->getKind());
169 ModuleBase_Operation* XGUI_OperationMgr::previousOperation(ModuleBase_Operation* theOperation) const
171 int idx = myOperations.lastIndexOf(theOperation);
172 if(idx == -1 || idx == 0) {
175 return myOperations.at(idx - 1);
178 bool XGUI_OperationMgr::startOperation(ModuleBase_Operation* theOperation)
181 currentOperation()->postpone();
182 myOperations.append(theOperation);
184 connect(theOperation, SIGNAL(beforeStarted()), SLOT(onBeforeOperationStarted()));
185 connect(theOperation, SIGNAL(beforeAborted()), SLOT(onBeforeOperationAborted()));
186 connect(theOperation, SIGNAL(beforeCommitted()), SLOT(onBeforeOperationCommitted()));
188 connect(theOperation, SIGNAL(started()), SLOT(onOperationStarted()));
189 connect(theOperation, SIGNAL(aborted()), SLOT(onOperationAborted()));
190 connect(theOperation, SIGNAL(committed()), SLOT(onOperationCommitted()));
192 connect(theOperation, SIGNAL(stopped()), SLOT(onOperationStopped()));
193 connect(theOperation, SIGNAL(resumed()), SLOT(onOperationResumed()));
195 bool isStarted = theOperation->start();
197 onValidateOperation();
201 bool XGUI_OperationMgr::abortAllOperations()
207 if (operationsCount() == 1) {
208 ModuleBase_Operation* aCurrentOperation = currentOperation();
209 if (canStopOperation(aCurrentOperation)) {
210 abortOperation(aCurrentOperation);
216 aResult = QMessageBox::question(qApp->activeWindow(),
217 tr("Abort operation"),
218 tr("All active operations will be aborted."),
219 QMessageBox::Ok | QMessageBox::Cancel,
220 QMessageBox::Cancel) == QMessageBox::Ok;
221 while(aResult && hasOperation()) {
222 abortOperation(currentOperation());
228 bool XGUI_OperationMgr::commitAllOperations()
230 bool isCompositeCommitted = false, anOperationProcessed = false;
231 while (hasOperation()) {
232 ModuleBase_Operation* anOperation = currentOperation();
233 if (XGUI_Tools::workshop(myWorkshop)->errorMgr()->isApplyEnabled()) {
234 anOperationProcessed = onCommitOperation();
236 abortOperation(anOperation);
237 anOperationProcessed = true;
239 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
242 FeaturePtr aFeature = aFOperation->feature();
243 CompositeFeaturePtr aComposite =
244 std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aFeature);
245 isCompositeCommitted = aComposite.get();
246 if (isCompositeCommitted)
249 // not processed[committed] operation might be used in composite feature,
250 // so the while will be stopped by the previous check.
251 // this code is not necessary, but logically should be done when the processing will not
252 // be done for not composite feature by some reasons
253 if (!anOperationProcessed)
259 void XGUI_OperationMgr::onValidateOperation()
263 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
264 (currentOperation());
265 if(aFOperation && aFOperation->feature().get())
266 XGUI_Tools::workshop(myWorkshop)->errorMgr()->updateActions(aFOperation->feature());
269 void XGUI_OperationMgr::updateApplyOfOperations(ModuleBase_Operation* theOperation)
271 XGUI_ErrorMgr* anErrorMgr = XGUI_Tools::workshop(myWorkshop)->errorMgr();
273 ModuleBase_OperationFeature* aFOperation =
274 dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
276 anErrorMgr->updateAcceptAllAction(aFOperation->feature());
279 foreach(ModuleBase_Operation* anOperation, myOperations) {
281 updateApplyOfOperations(anOperation);
284 // Apply button of the current operation should also be updated
285 onValidateOperation();
288 bool XGUI_OperationMgr::canStopOperation(ModuleBase_Operation* theOperation)
290 //in case of nested (sketch) operation no confirmation needed
291 if (isGrantedOperation(theOperation->id()))
293 if (theOperation && theOperation->isModified()) {
294 QString aMessage = tr("%1 operation will be aborted.").arg(theOperation->id());
295 int anAnswer = QMessageBox::question(qApp->activeWindow(),
296 tr("Abort operation"),
298 QMessageBox::Ok | QMessageBox::Cancel,
299 QMessageBox::Cancel);
300 return anAnswer == QMessageBox::Ok;
305 bool XGUI_OperationMgr::commitOperation()
307 //if (hasOperation() && currentOperation()->isValid()) {
308 // onCommitOperation();
312 return onCommitOperation();
315 void XGUI_OperationMgr::resumeOperation(ModuleBase_Operation* theOperation)
317 theOperation->resume();
320 bool XGUI_OperationMgr::isGrantedOperation(const QString& theId)
322 bool isGranted = false;
324 QListIterator<ModuleBase_Operation*> anIt(myOperations);
326 ModuleBase_Operation* aPreviousOperation = 0;
327 while (anIt.hasPrevious() && !isGranted) {
328 ModuleBase_Operation* anOp = anIt.previous();
330 isGranted = anOp->isGranted(theId);
335 void XGUI_OperationMgr::setCurrentFeature(const FeaturePtr& theFeature)
337 SessionPtr aMgr = ModelAPI_Session::get();
338 DocumentPtr aDoc = aMgr->activeDocument();
339 bool aIsOp = aMgr->isOperation();
341 aMgr->startOperation(QString("Set current feature: %1")
342 .arg(theFeature->getKind().c_str()).toStdString());
343 aDoc->setCurrentFeature(theFeature, false);
344 #ifdef DEBUG_CURRENT_FEATURE
345 qDebug(QString(" document->setCurrentFeature(false) = %1 SET").arg(
346 ModuleBase_Tools::objectName(
347 ModelAPI_Session::get()->activeDocument()->currentFeature(false))).toStdString().c_str());
351 aMgr->finishOperation();
354 bool XGUI_OperationMgr::canStartOperation(const QString& theId, bool& isCommitted)
356 bool aCanStart = true;
358 ModuleBase_Operation* aCurrentOp = currentOperation();
360 bool aGranted = aCurrentOp->isGranted(theId);
361 // the started operation is granted for the current one,
362 // e.g. current - Sketch, started - Line
367 if (!isGrantedOperation(theId)) {
368 // the operation is not granted in the current list of operations
369 // e.g. Edit Parameter when Sketch, Line in Sketch is active.
370 aCanStart = abortAllOperations();
372 else if (canStopOperation(aCurrentOp)) {
373 // the started operation is granted in the parrent operation,
374 // e.g. current - Line in Sketch, started Circle
375 stopOperation(aCurrentOp, isCommitted);
384 void XGUI_OperationMgr::stopOperation(ModuleBase_Operation* theOperation, bool& isCommitted)
386 if (XGUI_Tools::workshop(myWorkshop)->errorMgr()->isApplyEnabled() && theOperation->isModified())
387 isCommitted = theOperation->commit();
390 abortOperation(theOperation);
394 void XGUI_OperationMgr::abortOperation(ModuleBase_Operation* theOperation)
396 ModuleBase_Operation* aCurrentOperation = currentOperation();
397 if (theOperation == aCurrentOperation)
398 theOperation->abort();
400 // it is possible to trigger upper operation(e.g. sketch, current is sketch line)
401 // all operation from the current to triggered should also be aborted
402 // operations over the parameter one are not aborted(e.g. extrusion cut, sketch abort)
403 while(hasOperation()) {
404 ModuleBase_Operation* aCurrentOperation = currentOperation();
405 aCurrentOperation->abort();
406 if(theOperation == aCurrentOperation)
412 bool XGUI_OperationMgr::onCommitOperation()
414 bool isCommitted = false;
415 ModuleBase_Operation* anOperation = currentOperation();
416 if (anOperation && myWorkshop->module()->canCommitOperation())
417 isCommitted = anOperation->commit();
421 void XGUI_OperationMgr::onAbortOperation()
423 ModuleBase_Operation* aCurrentOperation = currentOperation();
424 if (aCurrentOperation && canStopOperation(aCurrentOperation)) {
425 abortOperation(aCurrentOperation);
429 void XGUI_OperationMgr::onBeforeOperationStarted()
431 ModuleBase_Operation* aCurrentOperation = dynamic_cast<ModuleBase_Operation*>(sender());
432 if (!aCurrentOperation)
435 /// Set current feature and remeber old current feature
436 ModuleBase_OperationFeature* aFOperation =
437 dynamic_cast<ModuleBase_OperationFeature*>(aCurrentOperation);
439 SessionPtr aMgr = ModelAPI_Session::get();
440 DocumentPtr aDoc = aMgr->activeDocument();
441 // the parameter of current feature should be false, we should use all feature, not only
442 // visible in order to correctly save the previous feature of the nested operation, where the
443 // features can be not visible in the tree. The problem case is Edit sketch entitity(line)
444 // in the Sketch, created in ExtrusionCut operation. The entity disappears by commit.
445 // When sketch entity operation started, the sketch should be cashed here as the current.
446 // Otherwise(the flag is true), the ExtrusionCut is cashed, when commit happens, the sketch
447 // is disabled, sketch entity is disabled as extrusion cut is created earliest then sketch.
448 // As a result the sketch disappears from the viewer.
449 // However after commit it is displayed back.
450 aFOperation->setPreviousCurrentFeature(aDoc->currentFeature(false));
452 #ifdef DEBUG_CURRENT_FEATURE
453 FeaturePtr aFeature = aFOperation->feature();
454 QString aKind = aFeature ? aFeature->getKind().c_str() : "";
456 qDebug(QString("onBeforeOperationStarted() isEditOperation = %1, feature = %2")
457 .arg(aFOperation->isEditOperation())
458 .arg(ModuleBase_Tools::objectName(aFeature)).toStdString().c_str());
459 qDebug(QString(" document->currentFeature(false) = %1 : DO: setPreviousCurrentFeature").arg(
460 ModuleBase_Tools::objectName(aDoc->currentFeature(false))).toStdString().c_str());
463 if (aFOperation->isEditOperation()) {// it should be performed by the feature edit only
464 // in create operation, the current feature is changed by addFeature()
465 aDoc->setCurrentFeature(aFOperation->feature(), false);
466 #ifdef DEBUG_CURRENT_FEATURE
467 qDebug(QString(" document->setCurrentFeature(false) = %1").arg(
468 ModuleBase_Tools::objectName(aDoc->currentFeature(false))).toStdString().c_str());
470 // this is the only place where flushes must be called after setCurrentFeature for the
471 // current moment: after this the opertion is not finished, so, the ObjectBrowser
472 // state may be corrupted (issue #1457)
473 static Events_Loop* aLoop = Events_Loop::loop();
474 static Events_ID aCreateEvent = aLoop->eventByName(EVENT_OBJECT_CREATED);
475 aLoop->flush(aCreateEvent);
476 static Events_ID aDeleteEvent = aLoop->eventByName(EVENT_OBJECT_DELETED);
477 aLoop->flush(aDeleteEvent);
482 void XGUI_OperationMgr::onOperationStarted()
484 ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
485 updateApplyOfOperations(aSenderOperation);
486 XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myWorkshop);
487 aWorkshop->operationStarted(aSenderOperation);
490 void XGUI_OperationMgr::onBeforeOperationAborted()
492 onBeforeOperationCommitted();
495 void XGUI_OperationMgr::onOperationAborted()
497 ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
498 emit operationAborted(aSenderOperation);
501 void XGUI_OperationMgr::onBeforeOperationCommitted()
503 ModuleBase_Operation* aCurrentOperation = dynamic_cast<ModuleBase_Operation*>(sender());
504 if (!aCurrentOperation)
507 /// Restore the previous current feature
508 ModuleBase_OperationFeature* aFOperation =
509 dynamic_cast<ModuleBase_OperationFeature*>(aCurrentOperation);
511 #ifdef DEBUG_CURRENT_FEATURE
512 QString aKind = aFOperation->feature()->getKind().c_str();
513 qDebug(QString("onBeforeOperationCommitted() isEditOperation = %1, feature = %2")
514 .arg(aFOperation->isEditOperation())
515 .arg(ModuleBase_Tools::objectName(aFOperation->feature())).toStdString().c_str());
516 qDebug(QString(" document->currentFeature(false) = %1").arg(
517 ModuleBase_Tools::objectName(
518 ModelAPI_Session::get()->activeDocument()->currentFeature(false)))
519 .toStdString().c_str());
522 if (aFOperation->isEditOperation()) {
523 /// Restore the previous current feature
524 setCurrentFeature(aFOperation->previousCurrentFeature());
526 else { // create operation
527 // the Top created feature should stays the current. In nested operations,
528 // like Line in the Sketch or
529 // Sketch in ExtrusionCut, a previous feature should be restored on commit.
530 // It is performed here
531 // in order to perform it in the current transaction without opening a new one.
532 if (myOperations.front() != aFOperation)
533 setCurrentFeature(aFOperation->previousCurrentFeature());
535 ModuleBase_IModule* aModule = myWorkshop->module();
537 aModule->beforeOperationStopped(aFOperation);
541 void XGUI_OperationMgr::onOperationCommitted()
543 // apply state for all features from the stack of operations should be updated
544 updateApplyOfOperations();
546 ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
547 emit operationCommitted(aSenderOperation);
550 void XGUI_OperationMgr::onOperationResumed()
552 ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
553 emit operationResumed(aSenderOperation);
556 void XGUI_OperationMgr::onOperationStopped()
558 ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
559 ModuleBase_Operation* aCurrentOperation = currentOperation();
560 if (!aSenderOperation || !aCurrentOperation || aSenderOperation != aCurrentOperation)
563 myOperations.removeAll(aCurrentOperation);
564 aCurrentOperation->deleteLater();
566 emit operationStopped(aCurrentOperation);
568 // get last operation which can be resumed
569 ModuleBase_Operation* aResultOp = 0;
570 QListIterator<ModuleBase_Operation*> anIt(myOperations);
572 while (anIt.hasPrevious()) {
573 ModuleBase_Operation* anOp = anIt.previous();
580 bool isModified = aCurrentOperation->isModified();
581 aResultOp->setIsModified(aResultOp->isModified() || isModified);
582 resumeOperation(aResultOp);
583 onValidateOperation();
587 bool XGUI_OperationMgr::onKeyReleased(QObject *theObject, QKeyEvent* theEvent)
589 // Let the manager decide what to do with the given key combination.
590 ModuleBase_Operation* anOperation = currentOperation();
591 bool isAccepted = false;
592 switch (theEvent->key()) {
593 case Qt::Key_Escape: {
594 ModuleBase_Operation* aOperation = currentOperation();
602 case Qt::Key_Backtab:
604 ModuleBase_Operation* aOperation = currentOperation();
606 ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
607 if (aPanel) { // check for case when the operation is started but property panel is not filled
608 XGUI_PropertyPanel* aPP = dynamic_cast<XGUI_PropertyPanel*>(aPanel);
609 aPP->focusNextPrevChild_(theEvent->key() == Qt::Key_Tab);
616 case Qt::Key_Enter: {
617 isAccepted = onProcessEnter(theObject);
622 bool noModifiers = (theEvent->modifiers() == Qt::NoModifier);
624 ModuleBase_IViewer* aViewer = myWorkshop->viewer();
625 Handle(AIS_InteractiveContext) aContext = aViewer->AISContext();
626 if (!aContext.IsNull()) {
627 Handle(V3d_View) aView = aViewer->activeView();
628 if ((theEvent->key() == Qt::Key_N))
629 aContext->HilightNextDetected(aView);
630 else if ((theEvent->key() == Qt::Key_P))
631 aContext->HilightPreviousDetected(aView);
642 // anOperation->keyReleased(theEvent->key());
647 bool XGUI_OperationMgr::onProcessEnter(QObject* theObject)
649 bool isAccepted = false;
650 ModuleBase_Operation* aOperation = currentOperation();
651 // to avoid enter processing when operation has not been started yet
654 ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel();
655 // the next code is obsolete as we want to process Enter in property panel always
656 // only property panel enter is processed in order to do not process enter in application dialogs
657 //bool isPPChild = isChildObject(theObject, aPanel);
659 // return isAccepted;
661 ModuleBase_ModelWidget* anActiveWgt = aPanel->activeWidget();
662 bool isAborted = false;
664 QWidget* aFocusWidget = aPanel->focusWidget();
665 QToolButton* aCancelBtn =
666 dynamic_cast<XGUI_PropertyPanel*>(aPanel)->findButton(PROP_PANEL_CANCEL);
667 if (aFocusWidget && aCancelBtn && aFocusWidget == aCancelBtn) {
668 abortOperation(aOperation);
674 isAccepted = anActiveWgt && anActiveWgt->processEnter();
677 myWorkshop->module()->processEnter(anActiveWgt ? anActiveWgt->attributeID() : "");
679 /// functionality is similar to Apply click
680 ModuleBase_OperationFeature* aFOperation =
681 dynamic_cast<ModuleBase_OperationFeature*>(currentOperation());
683 myWorkshop->module()->getFeatureError(aFOperation->feature()).isEmpty()) {
684 // key released is emitted to apply the current value to the model
685 // if it was modified in PP
686 emit keyEnterReleased();
698 bool editorControl(QObject* theObject)
700 QLineEdit* aLineEdit = dynamic_cast<QLineEdit*>(theObject);
704 bool XGUI_OperationMgr::onProcessDelete(QObject* theObject)
706 bool isAccepted = false;
707 ModuleBase_Operation* aOperation = currentOperation();
708 ModuleBase_ModelWidget* anActiveWgt = 0;
709 // firstly the widget should process Delete action
710 ModuleBase_IPropertyPanel* aPanel;
711 bool isPPChildObject = false;
713 aPanel = aOperation->propertyPanel();
715 isPPChildObject = isChildObject(theObject, aPanel);
716 // process delete in active widget only if delete sender is child of property panel
717 // it is necessary for the case when OB is shown, user perform selection and click Delete
718 if (isPPChildObject) {
719 anActiveWgt = aPanel->activeWidget();
721 isAccepted = anActiveWgt->processDelete();
727 // after widget, object browser and viewer should process delete
728 /// other widgets such as line edit controls should not lead to
729 /// processing delete by workshop
730 XGUI_ObjectsBrowser* aBrowser = XGUI_Tools::workshop(myWorkshop)->objectBrowser();
731 QWidget* aViewPort = myWorkshop->viewer()->activeViewPort();
732 bool isToDeleteObject = false;
733 XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myWorkshop);
734 XGUI_ContextMenuMgr* aContextMenuMgr = aWorkshop->contextMenuMgr();
735 if (theObject == aBrowser->treeView()) {
736 aContextMenuMgr->updateObjectBrowserMenu();
737 isToDeleteObject = aContextMenuMgr->action("DELETE_CMD")->isEnabled();
739 else if (isChildObject(theObject, aViewPort)) {
740 aContextMenuMgr->updateViewerMenu();
741 isToDeleteObject = aContextMenuMgr->action("DELETE_CMD")->isEnabled();
743 else if (isPPChildObject) {
744 // property panel child object is processed to process delete performed on Apply button of PP
745 isToDeleteObject = true;
747 else if (editorControl(theObject)) {
748 isToDeleteObject = false; /// Line Edit of Rename operation in ObjectBrowser
752 if (isToDeleteObject) {
753 aWorkshop->deleteObjects();
761 bool XGUI_OperationMgr::isChildObject(const QObject* theObject, const QObject* theParent)
763 bool isPPChild = false;
764 if (theParent && theObject) {
765 QObject* aParent = (QObject*)theObject;
767 isPPChild = aParent == theParent;
770 aParent = aParent->parent();