From: vsv Date: Tue, 9 Jun 2015 15:07:29 +0000 (+0300) Subject: ExtrusionCut launch X-Git-Tag: V_1.3.0~257 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bc040d7778dfca67e24a0452ce41f88417799adb;p=modules%2Fshaper.git ExtrusionCut launch --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp index 1decb449c..7fd7c1301 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp @@ -44,8 +44,6 @@ void FeaturesPlugin_Extrusion::initAttributes() data()->addAttribute(FeaturesPlugin_Extrusion::TO_SIZE_ID(), ModelAPI_AttributeDouble::typeId()); data()->addAttribute(FeaturesPlugin_Extrusion::FROM_SIZE_ID(), ModelAPI_AttributeDouble::typeId()); - //data()->addAttribute(FeaturesPlugin_Extrusion::AXIS_OBJECT_ID(), ModelAPI_AttributeReference::typeId()); - data()->addAttribute(FeaturesPlugin_Extrusion::FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId()); data()->addAttribute(FeaturesPlugin_Extrusion::TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId()); diff --git a/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.cpp b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.cpp index cfd5b5d56..09d56a486 100755 --- a/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.cpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include //================================================================================================= FeaturesPlugin_ExtrusionCut::FeaturesPlugin_ExtrusionCut() @@ -20,26 +22,74 @@ FeaturesPlugin_ExtrusionCut::FeaturesPlugin_ExtrusionCut() //================================================================================================= void FeaturesPlugin_ExtrusionCut::initAttributes() { - data()->addAttribute(FeaturesPlugin_ExtrusionCut::SKETCH_OBJECT_ID(), ModelAPI_AttributeReference::typeId()); - data()->addAttribute(FeaturesPlugin_ExtrusionCut::TO_SIZE_ID(), ModelAPI_AttributeDouble::typeId()); - data()->addAttribute(FeaturesPlugin_ExtrusionCut::FROM_SIZE_ID(), ModelAPI_AttributeDouble::typeId()); + data()->addAttribute(SKETCH_OBJECT_ID(), ModelAPI_AttributeReference::typeId()); - data()->addAttribute(FeaturesPlugin_ExtrusionCut::AXIS_OBJECT_ID(), ModelAPI_AttributeReference::typeId()); + data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId()); + data()->addAttribute(FROM_SIZE_ID(), ModelAPI_AttributeDouble::typeId()); - data()->addAttribute(FeaturesPlugin_ExtrusionCut::FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId()); - data()->addAttribute(FeaturesPlugin_ExtrusionCut::TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId()); + data()->addAttribute(TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId()); + data()->addAttribute(TO_SIZE_ID(), ModelAPI_AttributeDouble::typeId()); ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FeaturesPlugin_ExtrusionCut::FROM_OBJECT_ID()); ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FeaturesPlugin_ExtrusionCut::TO_OBJECT_ID()); - AttributeSelectionListPtr aSelection = - std::dynamic_pointer_cast(data()->addAttribute( - FeaturesPlugin_ExtrusionCut::LIST_ID(), ModelAPI_AttributeSelectionList::typeId())); + data()->addAttribute(CUTLIST_ID(), ModelAPI_AttributeSelectionList::typeId()); + // extrusion works with faces always + AttributeSelectionListPtr aSelection = data()->selectionList(CUTLIST_ID()); aSelection->setSelectionType("SOLID"); } + +std::shared_ptr FeaturesPlugin_ExtrusionCut::addFeature(std::string theID) +{ + std::shared_ptr aNew = document()->addFeature(theID, false); + if (aNew) { + data()->reference(SKETCH_OBJECT_ID())->setValue(aNew); + } + // set as current also after it becomes sub to set correctly enabled for other sketch subs + //document()->setCurrentFeature(aNew, false); + return aNew; +} + + +int FeaturesPlugin_ExtrusionCut::numberOfSubs() const +{ + ObjectPtr aObj = data()->reference(SKETCH_OBJECT_ID())->value(); + return aObj.get()? 1 : 0; +} + +std::shared_ptr FeaturesPlugin_ExtrusionCut::subFeature(const int theIndex) const +{ + if (theIndex == 0) + return std::dynamic_pointer_cast(data()->reference(SKETCH_OBJECT_ID())->value()); + return std::shared_ptr(); +} + +int FeaturesPlugin_ExtrusionCut::subFeatureId(const int theIndex) const +{ + std::shared_ptr aFeature = subFeature(theIndex); + if (aFeature.get()) + return aFeature->data()->featureId(); + return -1; +} + +bool FeaturesPlugin_ExtrusionCut::isSub(ObjectPtr theObject) const +{ + // check is this feature of result + FeaturePtr aFeature = std::dynamic_pointer_cast(theObject); + if (!aFeature) + return false; + + ObjectPtr aSub = data()->reference(SKETCH_OBJECT_ID())->value(); + return aSub == theObject; +} + +void FeaturesPlugin_ExtrusionCut::removeFeature(std::shared_ptr theFeature) +{ +} + //================================================================================================= void FeaturesPlugin_ExtrusionCut::execute() { diff --git a/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.h b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.h index 8285682ee..650a6bcc0 100755 --- a/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.h +++ b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionCut.h @@ -9,12 +9,12 @@ #include -#include +#include /** \class FeaturesPlugin_ExtrusionCut * \ingroup Plugins */ -class FeaturesPlugin_ExtrusionCut : public ModelAPI_Feature +class FeaturesPlugin_ExtrusionCut : public ModelAPI_CompositeFeature { public: /// Revolution kind. @@ -26,10 +26,10 @@ class FeaturesPlugin_ExtrusionCut : public ModelAPI_Feature /// attribute name of references sketch entities list, it should contain a sketch result or /// a pair a sketch result to sketch face - inline static const std::string& LIST_ID() + inline static const std::string& CUTLIST_ID() { - static const std::string MY_GROUP_LIST_ID("main_objects"); - return MY_GROUP_LIST_ID; + static const std::string MY_CUT_LIST_ID("cut_objects"); + return MY_CUT_LIST_ID; } /// attribute name of an object to which the extrusion grows @@ -39,13 +39,6 @@ class FeaturesPlugin_ExtrusionCut : public ModelAPI_Feature return MY_TO_OBJECT_ID; } - /// Attribute name of an object to which the extrusion grows. - inline static const std::string& AXIS_OBJECT_ID() - { - static const std::string MY_TO_OBJECT_ID("axis_object"); - return MY_TO_OBJECT_ID; - } - /// attribute name of extrusion size inline static const std::string& TO_SIZE_ID() { @@ -53,13 +46,6 @@ class FeaturesPlugin_ExtrusionCut : public ModelAPI_Feature return MY_TO_SIZE_ID; } - /// attribute name of extrusion size - inline static const std::string& FROM_SIZE_ID() - { - static const std::string MY_FROM_SIZE_ID("from_size"); - return MY_FROM_SIZE_ID; - } - /// attribute name of an object to which the extrusion grows inline static const std::string& TO_OBJECT_ID() { @@ -74,6 +60,13 @@ class FeaturesPlugin_ExtrusionCut : public ModelAPI_Feature return MY_FROM_OBJECT_ID; } + /// attribute name of extrusion size + inline static const std::string& FROM_SIZE_ID() + { + static const std::string MY_FROM_SIZE_ID("from_size"); + return MY_FROM_SIZE_ID; + } + /// Returns the kind of a feature FEATURESPLUGIN_EXPORT virtual const std::string& getKind() { @@ -89,6 +82,25 @@ class FeaturesPlugin_ExtrusionCut : public ModelAPI_Feature /// Use plugin manager for features creation. FeaturesPlugin_ExtrusionCut(); + + /// appends a feature to the sketch sub-elements container + FEATURESPLUGIN_EXPORT virtual std::shared_ptr addFeature(std::string theID); + + /// Returns the number of sub-elements + FEATURESPLUGIN_EXPORT virtual int numberOfSubs() const; + + /// Returns the sub-feature by zero-base index + FEATURESPLUGIN_EXPORT virtual std::shared_ptr subFeature(const int theIndex) const; + + /// Returns the sub-feature unique identifier in this composite feature by zero-base index + FEATURESPLUGIN_EXPORT virtual int subFeatureId(const int theIndex) const; + + /// Returns true if feature or reuslt belong to this composite feature as subs + FEATURESPLUGIN_EXPORT virtual bool isSub(ObjectPtr theObject) const; + + /// This method to inform that sub-feature is removed and must be removed from the internal data + /// structures of the owner (the remove from the document will be done outside just after) + FEATURESPLUGIN_EXPORT virtual void removeFeature(std::shared_ptr theFeature); }; #endif diff --git a/src/FeaturesPlugin/extrusioncut_widget.xml b/src/FeaturesPlugin/extrusioncut_widget.xml index dc541d1cc..80f1b714c 100755 --- a/src/FeaturesPlugin/extrusioncut_widget.xml +++ b/src/FeaturesPlugin/extrusioncut_widget.xml @@ -2,13 +2,12 @@ - + tooltip="Create or edit a sketch"> + + - @@ -37,18 +32,14 @@ default="<sketch>"> - - isCheckable() && !aCmd->isChecked()) return; launchOperation(aCmd->data().toString()); + emit operationLaunched(); } diff --git a/src/ModuleBase/ModuleBase_IModule.h b/src/ModuleBase/ModuleBase_IModule.h index 81652a0b3..435d2c5b9 100644 --- a/src/ModuleBase/ModuleBase_IModule.h +++ b/src/ModuleBase/ModuleBase_IModule.h @@ -137,6 +137,17 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// \param theObjectBrowser a pinter on Object Browser widget virtual void customizeObjectBrowser(QWidget* theObjectBrowser) {} + /// Creates a new operation + /// \param theCmdId the operation name + virtual ModuleBase_Operation* createOperation(const std::string& theCmdId); + + /// Sends the operation for launching + /// \param theOperation the operation + virtual void sendOperation(ModuleBase_Operation* theOperation); + +signals: + void operationLaunched(); + public slots: /// Called on call of command corresponded to a feature virtual void onFeatureTriggered(); @@ -156,14 +167,6 @@ protected slots: virtual void onSelectionChanged() {} protected: - /// Sends the operation for launching - /// \param theOperation the operation - virtual void sendOperation(ModuleBase_Operation* theOperation); - - /// Creates a new operation - /// \param theCmdId the operation name - virtual ModuleBase_Operation* createOperation(const std::string& theCmdId); - /// Register validators for this module virtual void registerValidators() {} diff --git a/src/PartSet/CMakeLists.txt b/src/PartSet/CMakeLists.txt index 8c69ea96b..5a243ebfb 100644 --- a/src/PartSet/CMakeLists.txt +++ b/src/PartSet/CMakeLists.txt @@ -25,6 +25,7 @@ SET(PROJECT_HEADERS PartSet_DocumentDataModel.h PartSet_PartDataModel.h PartSet_DataTreeModel.h + PartSet_WidgetSketchCreator.h ) SET(PROJECT_SOURCES @@ -45,6 +46,7 @@ SET(PROJECT_SOURCES PartSet_MenuMgr.cpp PartSet_DocumentDataModel.cpp PartSet_PartDataModel.cpp + PartSet_WidgetSketchCreator.cpp ) SET(PROJECT_RESOURCES diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index ce0555969..b6d90bd0c 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -11,6 +11,7 @@ #include "PartSet_WidgetMultiSelector.h" #include "PartSet_WidgetEditor.h" #include "PartSet_WidgetFileSelector.h" +#include "PartSet_WidgetSketchCreator.h" #include "PartSet_SketcherMgr.h" #include "PartSet_MenuMgr.h" @@ -514,7 +515,9 @@ ModuleBase_ModelWidget* PartSet_Module::createWidgetByType(const std::string& th aWgt = new PartSet_WidgetEditor(theParent, workshop(), theWidgetApi, theParentId); } else if (theType == "export_file_selector") { aWgt = new PartSet_WidgetFileSelector(theParent, workshop(), theWidgetApi, theParentId); - } + } else if (theType == "sketch_launcher") { + aWgt = new PartSet_WidgetSketchCreator(theParent, this, theWidgetApi, theParentId); + } return aWgt; } diff --git a/src/PartSet/PartSet_Module.h b/src/PartSet/PartSet_Module.h index e4388e0bb..1228a03ba 100644 --- a/src/PartSet/PartSet_Module.h +++ b/src/PartSet/PartSet_Module.h @@ -138,6 +138,10 @@ public: /// \param theObjectBrowser a pinter on Object Browser widget virtual void customizeObjectBrowser(QWidget* theObjectBrowser); + /// Sends the operation for launching + /// \param theOperation the operation + virtual void sendOperation(ModuleBase_Operation* theOperation); + public slots: /// SLOT, that is called by no more widget signal emitted by property panel /// Set a specific flag to restart the sketcher operation @@ -180,10 +184,6 @@ protected slots: /// Register properties of this module virtual void registerProperties(); - /// Sends the operation for launching - /// \param theOperation the operation - virtual void sendOperation(ModuleBase_Operation* theOperation); - private slots: /// Processing of vertex selected void onVertexSelected(); diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index a4c9cf1c8..a086aa868 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -719,7 +719,8 @@ void PartSet_SketcherMgr::startSketch(ModuleBase_Operation* theOperation) if (theOperation->isEditOperation()) { // If it is editing of sketch then it means that plane is already defined std::shared_ptr aPln = PartSet_Tools::sketchPlane(myCurrentSketch); - myPlaneFilter->setPlane(aPln->impl()); + if (aPln.get()) + myPlaneFilter->setPlane(aPln->impl()); } Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY)); // all sketch objects should be activated in the sketch selection modes by edit operation start diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp new file mode 100644 index 000000000..ffccda73a --- /dev/null +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -0,0 +1,127 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: PartSet_WidgetSketchCreator.cpp +// Created: 08 June 2015 +// Author: Vitaly SMETANNIKOV + +#include "PartSet_WidgetSketchCreator.h" +#include "PartSet_Module.h" + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include + +PartSet_WidgetSketchCreator::PartSet_WidgetSketchCreator(QWidget* theParent, + PartSet_Module* theModule, + const Config_WidgetAPI* theData, + const std::string& theParentId) +: ModuleBase_ModelWidget(theParent, theData, theParentId), myModule(theModule) +{ + QFormLayout* aLayout = new QFormLayout(this); + ModuleBase_Tools::adjustMargins(aLayout); + + QString aLabelText = QString::fromStdString(theData->widgetLabel()); + QString aLabelIcon = QString::fromStdString(theData->widgetIcon()); + myLabel = new QLabel(aLabelText, this); + if (!aLabelIcon.isEmpty()) + myLabel->setPixmap(QPixmap(aLabelIcon)); + + + QString aToolTip = QString::fromStdString(theData->widgetTooltip()); + myTextLine = new QLineEdit(this); + myTextLine->setReadOnly(true); + myTextLine->setToolTip(aToolTip); + myTextLine->installEventFilter(this); + + aLayout->addRow(myLabel, myTextLine); +} + +PartSet_WidgetSketchCreator::~PartSet_WidgetSketchCreator() +{ +} + +QList PartSet_WidgetSketchCreator::getControls() const +{ + QList aControls; + aControls.append(myTextLine); + return aControls; +} + +bool PartSet_WidgetSketchCreator::restoreValue() +{ + return true; +} + +bool PartSet_WidgetSketchCreator::storeValueCustom() const +{ + return true; +} + +void PartSet_WidgetSketchCreator::activateCustom() +{ + connect(myModule, SIGNAL(operationLaunched()), SLOT(onStarted())); + + + //XGUI_ModuleConnector* aConnector = dynamic_cast(myModule->workshop()); + //XGUI_Workshop* aWorkshop = aConnector->workshop(); + //XGUI_Displayer* aDisp = aWorkshop->displayer(); + + //QIntList aModes; + //aModes << TopAbs_FACE; + //aDisp->activateObjects(aModes); + // + //connect(aWorkshop->selector(), SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged())); + //activateFilters(myModule->workshop(), true); +} + +void PartSet_WidgetSketchCreator::onStarted() +{ + disconnect(myModule, SIGNAL(operationLaunched()), this, SLOT(onStarted())); + + CompositeFeaturePtr aCompFeature = std::dynamic_pointer_cast(myFeature); + FeaturePtr aSketch = aCompFeature->addFeature("Sketch"); + + ModuleBase_Operation* anOperation = myModule->createOperation("Sketch"); + anOperation->setFeature(aSketch); + myModule->sendOperation(anOperation); +} + +void PartSet_WidgetSketchCreator::storeAttributeValue() +{ +} + +void PartSet_WidgetSketchCreator::restoreAttributeValue(const bool theValid) +{ +} + +bool PartSet_WidgetSketchCreator::setSelectionCustom(const ModuleBase_ViewerPrs& thePrs) +{ + std::shared_ptr aFace(new GeomAPI_Face()); + aFace->setImpl(new TopoDS_Shape(thePrs.shape())); + if (aFace->isPlanar()) + return true; + //CompositeFeaturePtr aCompFeature = std::dynamic_pointer_cast(myFeature); + //FeaturePtr aSketch = aCompFeature->addFeature("Sketch"); + + //ModuleBase_Operation* anOperation = myModule->createOperation("Sketch"); + //anOperation->setFeature(aSketch); + //myModule->sendOperation(anOperation); + return false; +} + +bool PartSet_WidgetSketchCreator::setSelection(const QList& theValues, int& thePosition) +{ + return true; +} \ No newline at end of file diff --git a/src/PartSet/PartSet_WidgetSketchCreator.h b/src/PartSet/PartSet_WidgetSketchCreator.h new file mode 100644 index 000000000..827e6d95c --- /dev/null +++ b/src/PartSet/PartSet_WidgetSketchCreator.h @@ -0,0 +1,84 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: PartSet_WidgetSketchCreator.h +// Created: 08 June 2015 +// Author: Vitaly SMETANNIKOV + +#ifndef PartSet_WidgetSketchCreator_H +#define PartSet_WidgetSketchCreator_H + +#include "PartSet.h" + +#include + +class QLabel; +class QLineEdit; +class PartSet_Module; +class ModuleBase_Operation; + +class PARTSET_EXPORT PartSet_WidgetSketchCreator : public ModuleBase_ModelWidget +{ +Q_OBJECT + public: + /// Constructor + /// \param theParent the parent object + /// \param theData the widget configuation. The attribute of the model widget is obtained from + /// \param theParentId is Id of a parent of the current attribute + PartSet_WidgetSketchCreator(QWidget* theParent, PartSet_Module* theModule, + const Config_WidgetAPI* theData, const std::string& theParentId); + + virtual ~PartSet_WidgetSketchCreator(); + + /// Set the given wrapped value to the current widget + /// This value should be processed in the widget according to the needs + /// The method is called by the current operation to process the operation preselection. + /// It is redefined to do nothing if the plane of the sketch has been already set. + /// \param theValues the wrapped selection values + /// \param thePosition an index in the list of values, the values should be get from the index + virtual bool setSelection(const QList& theValues, int& thePosition); + + virtual bool restoreValue(); + + /// Returns list of widget controls + /// \return a control list + virtual QList getControls() const; + +protected: + /// Creates a backup of the current values of the attribute + /// It should be realized in the specific widget because of different + /// parameters of the current attribute + virtual void storeAttributeValue(); + + /// Creates a backup of the current values of the attribute + /// It should be realized in the specific widget because of different + /// parameters of the current attribute + /// \param theValid a boolean flag, if restore happens for valid parameters + virtual void restoreAttributeValue(const bool theValid); + + /// Fills the attribute with the value of the selected owner + /// \param theOwner a selected owner + virtual bool setSelectionCustom(const ModuleBase_ViewerPrs& thePrs); + + /// Saves the internal parameters to the given feature + /// \return True in success + virtual bool storeValueCustom() const; + + /// The methiod called when widget is activated + virtual void activateCustom(); + +private slots: + void onStarted(); + +private: + + PartSet_Module* myModule; + + /// Label of the widget + QLabel* myLabel; + + /// Input control of the widget + QLineEdit* myTextLine; + +}; + +#endif \ No newline at end of file diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index 0b4b6b946..82b234fff 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -354,11 +354,13 @@ std::shared_ptr PartSet_WidgetSketchLabel::setSketchPlane(const Top { if (theShape.IsNull()) return std::shared_ptr(); - + int aType = theShape.ShapeType(); // get selected shape std::shared_ptr aGShape(new GeomAPI_Shape); aGShape->setImpl(new TopoDS_Shape(theShape)); + + // get plane parameters std::shared_ptr aPlane = GeomAlgoAPI_FaceBuilder::plane(aGShape); diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 26ea5d021..6c53bb843 100644 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -132,7 +132,8 @@ void XGUI_PropertyPanel::updateContentWidget(FeaturePtr theFeature) if (theFeature->isAction() || !theFeature->data()) return; foreach(ModuleBase_ModelWidget* eachWidget, myWidgets) { - eachWidget->setFeature(theFeature); + if (!eachWidget->feature().get()) + eachWidget->setFeature(theFeature); eachWidget->restoreValue(); } // the repaint is used here to immediately react in GUI to the values change. diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 2c4e2fdcb..94ff9d955 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -1206,15 +1206,15 @@ void XGUI_Workshop::hideObjectBrowser() } //****************************************************** -void XGUI_Workshop::onFeatureTriggered() -{ - QAction* aCmd = dynamic_cast(sender()); - if (aCmd) { - QString aId = salomeConnector()->commandId(aCmd); - if (!aId.isNull()) - myModule->launchOperation(aId); - } -} +//void XGUI_Workshop::onFeatureTriggered() +//{ +// QAction* aCmd = dynamic_cast(sender()); +// if (aCmd) { +// QString aId = salomeConnector()->commandId(aCmd); +// if (!aId.isNull()) +// myModule->launchOperation(aId); +// } +//} //****************************************************** void XGUI_Workshop::salomeViewerSelectionChanged() diff --git a/src/XGUI/XGUI_Workshop.h b/src/XGUI/XGUI_Workshop.h index ea4190af0..f6d1cb7c8 100644 --- a/src/XGUI/XGUI_Workshop.h +++ b/src/XGUI/XGUI_Workshop.h @@ -234,6 +234,7 @@ signals: //! Signal to update Undo history list void updateUndoHistory(const QList&); + //! Signal to update Redo history list void updateRedoHistory(const QList&); @@ -284,7 +285,7 @@ signals: void hideObjectBrowser(); /// Reaction on command call - void onFeatureTriggered(); + //void onFeatureTriggered(); /// Close document void closeDocument();