From: nds Date: Tue, 22 Apr 2014 13:48:47 +0000 (+0400) Subject: Task #30 - Sketch base GUI: create, draw lines X-Git-Tag: V_0.2~137^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f97dbd33987e7bfda12b0962f104cabe7e40b9bd;p=modules%2Fshaper.git Task #30 - Sketch base GUI: create, draw lines The sketch addition to the OB. --- diff --git a/src/PartSet/CMakeLists.txt b/src/PartSet/CMakeLists.txt index 81da4af83..c4d25a782 100644 --- a/src/PartSet/CMakeLists.txt +++ b/src/PartSet/CMakeLists.txt @@ -60,7 +60,7 @@ ADD_LIBRARY(PartSet SHARED ) # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore -TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI SketchPlugin) +TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI) ADD_DEPENDENCIES(PartSet ModuleBase) diff --git a/src/SketchPlugin/SketchPlugin_Sketch.cpp b/src/SketchPlugin/SketchPlugin_Sketch.cpp index a665a700f..7fb20f079 100644 --- a/src/SketchPlugin/SketchPlugin_Sketch.cpp +++ b/src/SketchPlugin/SketchPlugin_Sketch.cpp @@ -34,15 +34,11 @@ void SketchPlugin_Sketch::initAttributes() void SketchPlugin_Sketch::execute() { - shared_ptr aDocRef = data()->docRef(PART_ATTR_DOC_REF); + /*shared_ptr aDocRef = data()->docRef(PART_ATTR_DOC_REF); if (!aDocRef->value()) { // create a document if not yet created shared_ptr aPartSetDoc = ModelAPI_PluginManager::get()->rootDocument(); aDocRef->setValue(aPartSetDoc->subDocument(data()->getName())); - } -} - -shared_ptr SketchPlugin_Sketch::documentToAdd() { - return ModelAPI_PluginManager::get()->rootDocument(); + }*/ } const TopoDS_Shape& SketchPlugin_Sketch::preview() diff --git a/src/SketchPlugin/SketchPlugin_Sketch.h b/src/SketchPlugin/SketchPlugin_Sketch.h index 0ac6ce1c8..a2b63388a 100644 --- a/src/SketchPlugin/SketchPlugin_Sketch.h +++ b/src/SketchPlugin/SketchPlugin_Sketch.h @@ -26,7 +26,7 @@ public: /// Returns to which group in the document must be added feature SKETCHPLUGIN_EXPORT virtual const std::string& getGroup() - {static std::string MY_GROUP = "Sketchs"; return MY_GROUP;} + {static std::string MY_GROUP = "Construction"; return MY_GROUP;} /// Creates a new part document if needed SKETCHPLUGIN_EXPORT virtual void execute(); @@ -34,8 +34,6 @@ public: /// Request for initialization of data model of the feature: adding all attributes SKETCHPLUGIN_EXPORT virtual void initAttributes(); - SKETCHPLUGIN_EXPORT virtual std::shared_ptr documentToAdd(); - /// Returns the sketch preview SKETCHPLUGIN_EXPORT virtual const TopoDS_Shape& preview();