From 15e998e07c05b98d7f6b6b13ce98574e7583ef26 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Fri, 4 Sep 2015 02:27:26 +0300 Subject: [PATCH] Gui/ViewProviderOriginFeature: remove the "New" selection model stuff The new selection model is not usable for the OriginFeature's view provider due to from one side it doesn't really have any subfeatures, so it won't be really needed, and on the other side we will have to use SoFCSelection because in that case it isn't possible to implement highlighting in any sane way (unless we will reimplement drawing ourselfs). --- src/Gui/ViewProviderOriginFeature.cpp | 27 --------------------------- src/Gui/ViewProviderOriginFeature.h | 12 ++---------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/src/Gui/ViewProviderOriginFeature.cpp b/src/Gui/ViewProviderOriginFeature.cpp index 364d2807aa..6770b05d80 100644 --- a/src/Gui/ViewProviderOriginFeature.cpp +++ b/src/Gui/ViewProviderOriginFeature.cpp @@ -115,7 +115,6 @@ void ViewProviderOriginFeature::attach(App::DocumentObject* pcObject) } highlight->objectName = getObject()->getNameInDocument(); highlight->documentName = getObject()->getDocument()->getName(); -// highlight->subElementName = "Main"; highlight->style = SoFCSelection::EMISSIVE_DIFFUSE; // Style for normal (visiable) lines @@ -177,29 +176,3 @@ void ViewProviderOriginFeature::setDisplayMode (const char* ModeName) setDisplayMaskMode("Base"); ViewProviderGeometryObject::setDisplayMode(ModeName); } - -std::string ViewProviderOriginFeature::getElement ( const SoDetail *detail ) const { -// TODO Explain what the heck here is or delete (2015-09-02, Fat-Zer) -// if (detail) { -// if (detail->getTypeId() == SoLineDetail::getClassTypeId()) { -// const SoLineDetail* line_detail = static_cast(detail); -// if (line_detail->getLineIndex() == 0) -// { -// return std::string("Main"); -// } -// } -// } - - return std::string(""); -} - -SoDetail* ViewProviderOriginFeature::getDetail ( const char* subelement ) const { -// TODO Explain what the heck here is or delete (2015-09-02, Fat-Zer) -// if ( strcmp(subelement, "Main") == 0 ) { -// SoLineDetail* detail = new SoLineDetail(); -// detail->setPartIndex( 0 ); -// return detail; -// } - - return 0; -} diff --git a/src/Gui/ViewProviderOriginFeature.h b/src/Gui/ViewProviderOriginFeature.h index e0b9582168..adc185c619 100644 --- a/src/Gui/ViewProviderOriginFeature.h +++ b/src/Gui/ViewProviderOriginFeature.h @@ -50,18 +50,10 @@ public: /// Get pointer to the text label associated with the feature SoAsciiText * getLabel () { return pLabel; } - /// indicates if the ViewProvider use the new Selection model - virtual bool useNewSelectionModel () const - { return true; } - virtual void attach(App::DocumentObject *); virtual void updateData(const App::Property *); - virtual std::vector getDisplayModes() const; - virtual void setDisplayMode(const char *ModeName); - - /// return a hit element to the selection path or 0 - virtual std::string getElement ( const SoDetail *detail ) const; - virtual SoDetail* getDetail ( const char *subelement ) const; + virtual std::vector getDisplayModes () const; + virtual void setDisplayMode (const char* ModeName); /// @name Suppress ViewProviderGeometryObject's behaviour ///@{