return false;
}
-void ModuleBase_OperationFeature::activateByPreselection(ModuleBase_IWorkshop* theWorkshop)
+ModuleBase_ModelWidget* ModuleBase_OperationFeature::activateByPreselection(
+ const std::string& theGreedAttributeId)
{
+ ModuleBase_ModelWidget* aWidget = 0;
if (myPreSelection.empty())
- return;
-
+ return aWidget;
+ // equal vertices should not be used here
ModuleBase_ISelection::filterSelectionOnEqualPoints(myPreSelection);
- std::string aGreedAttributeId = ModuleBase_Tools::findGreedAttribute(theWorkshop, myFeature);
-
ModuleBase_IPropertyPanel* aPropertyPanel = propertyPanel();
ModuleBase_ModelWidget* aFilledWgt = 0;
if (aPropertyPanel) {
QList<ModuleBase_ModelWidget*>::const_iterator aWIt;
ModuleBase_ModelWidget* aWgt = 0;
if (!aWidgets.empty()) {
- if (!aGreedAttributeId.empty()) {
+ if (!theGreedAttributeId.empty()) {
// set preselection to greed widget
for (aWIt = aWidgets.constBegin(); aWIt != aWidgets.constEnd(); ++aWIt) {
aWgt = (*aWIt);
- if (aWgt->attributeID() == aGreedAttributeId) {
+ if (aWgt->attributeID() == theGreedAttributeId) {
aPropertyPanel->setPreselectionWidget(aWgt);
aWgt->setSelection(myPreSelection, true);
aPropertyPanel->setPreselectionWidget(NULL);
+ aFilledWgt = aWgt;
break;
}
}
- // activate first not greed widget
- std::string aFirstAttributeId = aWidgets.front()->attributeID();
- if (aFirstAttributeId == aGreedAttributeId) // activate next widget after greeded
- aFilledWgt = aWidgets.front();
- else
- aFilledWgt = NULL; // activate first widget of the panel
}
else {
bool isSet = false;
// it is better to perform it not in setSelection of each widget, but do it here,
// after the preselection is processed
ModuleBase_ModelWidget::updateObject(myFeature);
-
- // 3. a signal should be emitted before the next widget activation
- // because, the activation of the next widget will give a focus to the widget. As a result
- // the value of the widget is initialized. And commit may happens until the value is entered.
- if (aFilledWgt)
- emit activatedByPreselection();
}
}
- // 4. activate the next obligatory widget
- aPropertyPanel->activateNextWidget(aFilledWgt);
-
clearPreselection();
+
+ return aFilledWgt;
}
void ModuleBase_OperationFeature::setParentFeature(CompositeFeaturePtr theParent)
/// \return Currently installed property panel
//ModuleBase_IPropertyPanel* propertyPanel() const { return myPropertyPanel; }
- /// Activates widgets by preselection if it is accepted. Emits signal if the activation is correct
- virtual void activateByPreselection(ModuleBase_IWorkshop* theWorkshop);
+ /// Activates widgets by preselection if it is accepted.
+ /// \param theGreeAttributeId a greed attribute id if there is in the current feature
+ /// \return last filled widget
+ virtual ModuleBase_ModelWidget* activateByPreselection(const std::string& theGreedAttributeId);
/// If the operation works with feature which is sub-feature of another one
/// then this variable has to be initialised by parent feature
/// \return theFeature a feature
FeaturePtr previousCurrentFeature();
-signals:
- /// The operation is filled with existing preselection
- void activatedByPreselection();
-
public slots:
/// Starts operation
/// Public slot. Verifies whether operation can be started and starts operation.
{
}
-void ModuleBase_WidgetEditor::editedValue(double& outValue, QString& outText)
+bool ModuleBase_WidgetEditor::editedValue(double& outValue, QString& outText)
{
+ bool isValueAccepted = false;
+
QDialog aDlg(QApplication::desktop(), Qt::FramelessWindowHint);
QHBoxLayout* aLay = new QHBoxLayout(&aDlg);
aLay->setContentsMargins(2, 2, 2, 2);
aPoint = QPoint(myXPosition, myYPosition);
aDlg.move(aPoint);
- aDlg.exec();
-
- outText = anEditor->text();
- bool isDouble;
- double aValue = outText.toDouble(&isDouble);
- if (isDouble) {
- outValue = aValue;
- outText = ""; // return empty string, if it's can be converted to a double
+ isValueAccepted = aDlg.exec() == QDialog::Accepted;
+ if (isValueAccepted) {
+ outText = anEditor->text();
+ bool isDouble;
+ double aValue = outText.toDouble(&isDouble);
+ if (isDouble) {
+ outValue = aValue;
+ outText = ""; // return empty string, if it's can be converted to a double
+ }
}
+ return isValueAccepted;
}
bool ModuleBase_WidgetEditor::focusTo()
return true;
}
-void ModuleBase_WidgetEditor::showPopupEditor(const bool theSendSignals)
+bool ModuleBase_WidgetEditor::showPopupEditor(const bool theSendSignals)
{
+ bool isValueAccepted = false;
// we need to emit the focus in event manually in order to save the widget as an active
// in the property panel before the mouse leave event happens in the viewer. The module
// ask an active widget and change the feature visualization if the widget is not the current one.
if (mySpinBox->hasVariable())
aText = mySpinBox->text();
- editedValue(aValue, aText);
- if (aText.isEmpty()) {
- ModuleBase_Tools::setSpinValue(mySpinBox, aValue);
- } else {
- ModuleBase_Tools::setSpinText(mySpinBox, aText);
- }
- if (theSendSignals) {
- emit valuesChanged();
- // the focus leaves the control automatically by the Enter/Esc event
- // it is processed in operation manager
- //emit focusOutWidget(this);
-
- if (!myIsEditing)
- emit enterClicked(this);
+ isValueAccepted = editedValue(aValue, aText);
+ if (isValueAccepted) {
+ if (aText.isEmpty()) {
+ ModuleBase_Tools::setSpinValue(mySpinBox, aValue);
+ } else {
+ ModuleBase_Tools::setSpinText(mySpinBox, aText);
+ }
+ if (theSendSignals) {
+ emit valuesChanged();
+ // the focus leaves the control automatically by the Enter/Esc event
+ // it is processed in operation manager
+ //emit focusOutWidget(this);
+ }
+ else
+ storeValue();
}
- else
- storeValue();
+
+ if (theSendSignals && !myIsEditing)
+ emit enterClicked(this);
+
+ return isValueAccepted;
}
void ModuleBase_WidgetEditor::setCursorPosition(const int theX, const int theY)
/// Shous popup window under cursor for data editing
/// \param theSendSignals a flag whether the signals should be sent or the value
/// is to be applyed directly
- void showPopupEditor(const bool theSendSignals = true);
+ /// \return true if the editor value is accepted
+ bool showPopupEditor(const bool theSendSignals = true);
void setCursorPosition(const int theX, const int theY);
private:
- void editedValue(double& outValue, QString& outText);
+ /// Show editor
+ /// \param theOutValue a result value
+ /// \param theOutText a result text
+ /// \return true if the editor value is accepted
+ bool editedValue(double& theOutValue, QString& theOutText);
private:
///< the current widget feature
XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(theWshop);
XGUI_Workshop* aWorkshop = aConnector->workshop();
- XGUI_OperationMgr* anOpMgr = aWorkshop->operationMgr();
- connect(anOpMgr, SIGNAL(operationActivatedByPreselection()),
- this, SLOT(onOperationActivatedByPreselection()));
-
ModuleBase_IViewer* aViewer = theWshop->viewer();
connect(aViewer, SIGNAL(keyRelease(ModuleBase_IViewWindow*, QKeyEvent*)),
this, SLOT(onKeyRelease(ModuleBase_IViewWindow*, QKeyEvent*)));
}
void PartSet_Module::operationStarted(ModuleBase_Operation* theOperation)
+{
+ ModuleBase_IWorkshop* anIWorkshop = workshop();
+ if (!theOperation->getDescription()->hasXmlRepresentation()) { //!< No need for property panel
+ anIWorkshop->updateCommandStatus();
+ }
+ else {
+ ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
+ (theOperation);
+ if (aFOperation) {
+ XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(anIWorkshop);
+ XGUI_PropertyPanel* aPropertyPanel = aWorkshop->propertyPanel();
+ ModuleBase_ModelWidget* aFilledWidget = 0;
+ bool aPostonedWidgetActivation = false;
+ FeaturePtr aFeature = aFOperation->feature();
+
+ std::string aGreedAttributeId = ModuleBase_Tools::findGreedAttribute(anIWorkshop, aFeature);
+ // if there is a greed attribute, automatic commit by preselection for this feature is prohibited
+ aWorkshop->setPropertyPanel(aFOperation);
+
+ // filling the operation values by the current selection
+ // if the operation can be committed after the controls filling, the method perform should
+ // be stopped. Otherwise unnecessary presentations can be shown(e.g. operation prs in sketch)
+ bool isOperationCommitted = false;
+ if (!aFOperation->isEditOperation()) {
+ aFilledWidget = aFOperation->activateByPreselection(aGreedAttributeId);
+ if (currentOperation() != aFOperation)
+ isOperationCommitted = true;
+ else {
+ if (aGreedAttributeId.empty()) {
+ // a signal should be emitted before the next widget activation
+ // because, the activation of the next widget will give a focus to the widget. As a result
+ // the value of the widget is initialized. And commit may happens until the value is entered.
+ if (aFilledWidget) {
+ if (mySketchReentrantMgr->canBeCommittedByPreselection())
+ isOperationCommitted = mySketchMgr->operationActivatedByPreselection();
+ // activate the next obligatory widget
+ if (!isOperationCommitted)
+ aPropertyPanel->activateNextWidget(aFilledWidget);
+ }
+ }
+ else { // there is a greed widget
+ const QList<ModuleBase_ModelWidget*>& aWidgets = aPropertyPanel->modelWidgets();
+ std::string aFirstAttributeId = aWidgets.front()->attributeID();
+ // activate next widget after greeded if it is the first widget in the panel
+ // else the first panel widget is already activated by operation start
+ if (aFirstAttributeId == aGreedAttributeId)
+ aPostonedWidgetActivation = true;
+ }
+ }
+ } if (!isOperationCommitted) {
+ anIWorkshop->updateCommandStatus();
+ aWorkshop->connectToPropertyPanel(true);
+ operationStartedInternal(aFOperation);
+
+ // the objects of the current operation should be deactivated
+ QObjectPtrList anObjects;
+ anObjects.append(aFeature);
+ std::list<ResultPtr> aResults = aFeature->results();
+ std::list<ResultPtr>::const_iterator aIt;
+ for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) {
+ anObjects.append(*aIt);
+ }
+ QObjectPtrList::const_iterator anIt = anObjects.begin(), aLast = anObjects.end();
+ for (; anIt != aLast; anIt++)
+ aWorkshop->deactivateActiveObject(*anIt, false);
+ if (anObjects.size() > 0) {
+ XGUI_Displayer* aDisplayer = aWorkshop->displayer();
+ aDisplayer->updateViewer();
+ }
+ }
+ if (aPostonedWidgetActivation) {
+ // if the widget is an empty in the chain of activated widgets, the current operation
+ // is restarted. It should be performed after functionality of the operation starting
+ aPropertyPanel->activateNextWidget(aFilledWidget);
+ }
+ }
+ }
+}
+
+void PartSet_Module::operationStartedInternal(ModuleBase_Operation* theOperation)
{
/// Restart sketcher operations automatically
mySketchReentrantMgr->operationStarted(theOperation);
anOpMgr->onKeyReleased(theWnd->viewPort(), theEvent);
}
-void PartSet_Module::onOperationActivatedByPreselection()
-{
- if (!mySketchReentrantMgr->canBeCommittedByPreselection())
- return;
- mySketchMgr->operationActivatedByPreselection();
-}
-
ModuleBase_ModelWidget* PartSet_Module::createWidgetByType(const std::string& theType,
QWidget* theParent,
Config_WidgetAPI* theWidgetApi)
/// \param theEvent the key event
void onKeyRelease(ModuleBase_IViewWindow* theWnd, QKeyEvent* theEvent);
- /// SLOT, that is called by the current operation filling with the preselection.
- /// It commits the operation of it is can be committed
- void onOperationActivatedByPreselection();
-
/// A slot called on view window creation
void onViewCreated(ModuleBase_IViewWindow*);
/// \param isToConnect a boolean value whether connect or disconnect
virtual void connectToPropertyPanel(ModuleBase_ModelWidget* theWidget, const bool isToConnect);
+ /// Realizes some functionality by an operation start
+ /// Displays all sketcher sub-Objects, hides sketcher result, appends selection filters
+ /// Activate the operation presentation
+ /// \param theOperation a started operation
+ virtual void operationStartedInternal(ModuleBase_Operation* theOperation);
+
private slots:
void onTreeViewDoubleClick(const QModelIndex&);
#include <XGUI_PropertyPanel.h>
#include <XGUI_ViewerProxy.h>
#include <XGUI_OperationMgr.h>
+#include <XGUI_Tools.h>
#include <ModuleBase_IPropertyPanel.h>
#include <ModuleBase_ISelection.h>
myModule->workshop()->viewer()->removeSelectionFilter(myPlaneFilter);
}
-void PartSet_SketcherMgr::operationActivatedByPreselection()
+bool PartSet_SketcherMgr::operationActivatedByPreselection()
{
+ bool isOperationStopped = false;
ModuleBase_Operation* anOperation = getCurrentOperation();
if(anOperation && PartSet_SketcherMgr::isNestedSketchOperation(anOperation)) {
// Set final definitions if they are necessary
//propertyPanelDefined(aOperation);
/// Commit sketcher operations automatically
+ /// distance operation are able to show popup editor to modify the distance value
+ /// after entering the value, the operation should be committed/aborted(by Esc key)
+ bool aCanCommitOperation = true;
ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
(anOperation);
- if (aFOperation) {
- if (PartSet_SketcherMgr::isDistanceOperation(aFOperation)) {
- FeaturePtr aFeature = aFOperation->feature();
- // editor is shown only if all attribute references are filled by preseletion
- bool anAllRefAttrInitialized = true;
-
- std::list<AttributePtr> aRefAttrs = aFeature->data()->attributes(
- ModelAPI_AttributeRefAttr::typeId());
- std::list<AttributePtr>::const_iterator anIt = aRefAttrs.begin(), aLast = aRefAttrs.end();
- for (; anIt != aLast && anAllRefAttrInitialized; anIt++) {
- anAllRefAttrInitialized = (*anIt)->isInitialized();
- }
- if (anAllRefAttrInitialized) {
- // Activate dimension value editing on double click
- ModuleBase_IPropertyPanel* aPanel = aFOperation->propertyPanel();
- QList<ModuleBase_ModelWidget*> aWidgets = aPanel->modelWidgets();
- // Find corresponded widget to activate value editing
- foreach (ModuleBase_ModelWidget* aWgt, aWidgets) {
- if (aWgt->attributeID() == "ConstraintValue") {
- // the featue should be displayed in order to find the AIS text position,
- // the place where the editor will be shown
- aFeature->setDisplayed(true);
- /// the execute is necessary to perform in the feature compute for flyout position
- aFeature->execute();
-
- Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED));
- Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
-
- PartSet_WidgetEditor* anEditor = dynamic_cast<PartSet_WidgetEditor*>(aWgt);
- if (anEditor) {
- int aX = 0, anY = 0;
-
- ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
- XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(aWorkshop);
- XGUI_Displayer* aDisplayer = aConnector->workshop()->displayer();
- AISObjectPtr anAIS = aDisplayer->getAISObject(aFeature);
- Handle(AIS_InteractiveObject) anAISIO;
- if (anAIS.get() != NULL) {
- anAISIO = anAIS->impl<Handle(AIS_InteractiveObject)>();
- }
- if (anAIS.get() != NULL) {
- Handle(AIS_InteractiveObject) anAISIO = anAIS->impl<Handle(AIS_InteractiveObject)>();
-
- if (!anAISIO.IsNull()) {
- Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(anAISIO);
- if (!aDim.IsNull()) {
- gp_Pnt aPosition = aDim->GetTextPosition();
-
- ModuleBase_IViewer* aViewer = aWorkshop->viewer();
- Handle(V3d_View) aView = aViewer->activeView();
- int aCX, aCY;
- aView->Convert(aPosition.X(), aPosition.Y(), aPosition.Z(), aCX, aCY);
-
- QWidget* aViewPort = aViewer->activeViewPort();
- QPoint aGlPoint = aViewPort->mapToGlobal(QPoint(aCX, aCY));
- aX = aGlPoint.x();
- anY = aGlPoint.y();
- }
- }
- anEditor->setCursorPosition(aX, anY);
- anEditor->showPopupEditor(false);
- }
- }
- }
- }
- }
- }
+ if (aFOperation && PartSet_SketcherMgr::isDistanceOperation(aFOperation))
+ aCanCommitOperation = setDistanceValueByPreselection(anOperation, myModule->workshop());
+
+ if (aCanCommitOperation)
+ isOperationStopped = anOperation->commit();
+ else {
+ anOperation->abort();
+ isOperationStopped = true;
}
- anOperation->commit();
}
+ return isOperationStopped;
}
bool PartSet_SketcherMgr::canUndo() const
myPlaneFilter->setPlane(thePln);
}
+bool PartSet_SketcherMgr::setDistanceValueByPreselection(ModuleBase_Operation* theOperation,
+ ModuleBase_IWorkshop* theWorkshop)
+{
+ bool isValueAccepted = false;
+
+ ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
+ (theOperation);
+ FeaturePtr aFeature = aFOperation->feature();
+ // editor is shown only if all attribute references are filled by preseletion
+ bool anAllRefAttrInitialized = true;
+
+ std::list<AttributePtr> aRefAttrs = aFeature->data()->attributes(
+ ModelAPI_AttributeRefAttr::typeId());
+ std::list<AttributePtr>::const_iterator anIt = aRefAttrs.begin(), aLast = aRefAttrs.end();
+ for (; anIt != aLast && anAllRefAttrInitialized; anIt++) {
+ anAllRefAttrInitialized = (*anIt)->isInitialized();
+ }
+ if (anAllRefAttrInitialized) {
+ // Activate dimension value editing on double click
+ ModuleBase_IPropertyPanel* aPanel = aFOperation->propertyPanel();
+ QList<ModuleBase_ModelWidget*> aWidgets = aPanel->modelWidgets();
+ // Find corresponded widget to activate value editing
+ foreach (ModuleBase_ModelWidget* aWgt, aWidgets) {
+ if (aWgt->attributeID() == "ConstraintValue") {
+ // the featue should be displayed in order to find the AIS text position,
+ // the place where the editor will be shown
+ aFeature->setDisplayed(true);
+ /// the execute is necessary to perform in the feature compute for flyout position
+ aFeature->execute();
+
+ Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED));
+ Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
+
+ PartSet_WidgetEditor* anEditor = dynamic_cast<PartSet_WidgetEditor*>(aWgt);
+ if (anEditor) {
+ int aX = 0, anY = 0;
+
+ XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(theWorkshop);
+ XGUI_Displayer* aDisplayer = aWorkshop->displayer();
+ AISObjectPtr anAIS = aDisplayer->getAISObject(aFeature);
+ Handle(AIS_InteractiveObject) anAISIO;
+ if (anAIS.get() != NULL) {
+ anAISIO = anAIS->impl<Handle(AIS_InteractiveObject)>();
+ }
+ if (anAIS.get() != NULL) {
+ Handle(AIS_InteractiveObject) anAISIO = anAIS->impl<Handle(AIS_InteractiveObject)>();
+
+ if (!anAISIO.IsNull()) {
+ Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(anAISIO);
+ if (!aDim.IsNull()) {
+ gp_Pnt aPosition = aDim->GetTextPosition();
+
+ ModuleBase_IViewer* aViewer = aWorkshop->viewer();
+ Handle(V3d_View) aView = aViewer->activeView();
+ int aCX, aCY;
+ aView->Convert(aPosition.X(), aPosition.Y(), aPosition.Z(), aCX, aCY);
+
+ QWidget* aViewPort = aViewer->activeViewPort();
+ QPoint aGlPoint = aViewPort->mapToGlobal(QPoint(aCX, aCY));
+ aX = aGlPoint.x();
+ anY = aGlPoint.y();
+ }
+ }
+ anEditor->setCursorPosition(aX, anY);
+ isValueAccepted = anEditor->showPopupEditor(false);
+ }
+ }
+ }
+ }
+ }
+ return isValueAccepted;
+}
+
void PartSet_SketcherMgr::getCurrentSelection(const FeaturePtr& theFeature,
const FeaturePtr& theSketch,
ModuleBase_IWorkshop* theWorkshop,
/// Commit the operation if it is possible. If the operation is dimention constraint,
/// it gives widget editor to input dimention value
- void operationActivatedByPreselection();
+ /// \return true if the operation is stopped after activation
+ bool operationActivatedByPreselection();
/// Returns True if there are available Undos and the sketch manager allows undo
/// \return the boolean result
void get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent,
Point& thePoint);
+ /// Show distance value editor if it is a distance operation and all attribute references
+ /// are filled by preseletion
+ /// \return true if the value is accepted
+ static bool setDistanceValueByPreselection(ModuleBase_Operation* theOperation,
+ ModuleBase_IWorkshop* theWorkshop);
+
typedef QMap<FeaturePtr, std::pair<std::set<AttributePtr>, std::set<ResultPtr> > >
FeatureToSelectionMap;
connect(theOperation, SIGNAL(stopped()), SLOT(onOperationStopped()));
connect(theOperation, SIGNAL(resumed()), SLOT(onOperationResumed()));
- ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
- (theOperation);
- if (aFOperation)
- connect(aFOperation, SIGNAL(activatedByPreselection()),
- SIGNAL(operationActivatedByPreselection()));
bool isStarted = theOperation->start();
if (isStarted)
/// Emitted when current operation is aborted
void operationAborted(ModuleBase_Operation* theOperation);
- /// Signal is emitted after the current operation is filled with existing preselection.
- void operationActivatedByPreselection();
-
/// Signal is emitted after the key released click.
void keyEnterReleased();
void XGUI_Workshop::onOperationStarted(ModuleBase_Operation* theOperation)
{
setGrantedFeatures(theOperation);
-
- ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
- (theOperation);
- if (!aFOperation)
- return;
-
- if (aFOperation->getDescription()->hasXmlRepresentation()) { //!< No need for property panel
- setPropertyPanel(aFOperation);
- // filling the operation values by the current selection
- // if the operation can be committed after the controls filling, the method perform should
- // be stopped. Otherwise unnecessary presentations can be shown(e.g. operation prs in sketch)
- if (!aFOperation->isEditOperation()) {
- aFOperation->activateByPreselection(moduleConnector());
- if (operationMgr()->currentOperation() != aFOperation)
- return;
- }
- }
- updateCommandStatus();
-
- connectToPropertyPanel(true);
- myModule->operationStarted(aFOperation);
-
- // the objects of the current operation should be deactivated
- QObjectPtrList anObjects;
- FeaturePtr aFeature = aFOperation->feature();
- anObjects.append(aFeature);
- std::list<ResultPtr> aResults = aFeature->results();
- std::list<ResultPtr>::const_iterator aIt;
- for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) {
- anObjects.append(*aIt);
- }
- QObjectPtrList::const_iterator anIt = anObjects.begin(), aLast = anObjects.end();
- for (; anIt != aLast; anIt++)
- deactivateActiveObject(*anIt, false);
- if (anObjects.size() > 0)
- myDisplayer->updateViewer();
+ myModule->operationStarted(theOperation);
}
//******************************************************
/// \param theUpdateViewer update viewer flag
void synchronizeGroupInViewer(const DocumentPtr& theDoc, const std::string& theGroup, bool theUpdateViewer);
+ /// Update the property panel content by the XML description of the operation and set the panel
+ /// into the operation
+ /// \param theOperation an operation
+ void setPropertyPanel(ModuleBase_Operation* theOperation);
+
+ /// Connects or disconnects to the value changed signal of the property panel widgets
+ /// \param isToConnect a boolean value whether connect or disconnect
+ void connectToPropertyPanel(const bool isToConnect);
+
/// A constant string used for "Move to end" command definition
/// It is used for specific processing of Undo/Redo for this command.
static QString MOVE_TO_END_COMMAND;
/// \param theOperation an operation
void setGrantedFeatures(ModuleBase_Operation* theOperation);
- /// Update the property panel content by the XML description of the operation and set the panel
- /// into the operation
- /// \param theOperation an operation
- void setPropertyPanel(ModuleBase_Operation* theOperation);
-
- /// Connects or disconnects to the value changed signal of the property panel widgets
- /// \param isToConnect a boolean value whether connect or disconnect
- void connectToPropertyPanel(const bool isToConnect);
-
//! Find all referenced features. Return direct and indirect lists of referenced object
//! \param theList an objects to be checked
//! \param aDirectRefFeatures a list of direct reference features