Sketcher: Show attachment overlay icon information
================================================== ViewProviderSketch now derives from the ViewProviderAttachExtension and gets the overlay icon when not attached. ViewProvider2DObject does not implement a ViewProviderAttachExtension although Part2DObject (on which SketchObject derives) does derive from AttachExtension. It is understood that this is because this functionality is unwanted for other ViewProviders.
This commit is contained in:
committed by
abdullahtahiriyo
parent
55219f85d4
commit
f9143750ab
@@ -301,6 +301,8 @@ ViewProviderSketch::ViewProviderSketch()
|
||||
isShownVirtualSpace(false),
|
||||
listener(0)
|
||||
{
|
||||
PartGui::ViewProviderAttachExtension::initExtension(this);
|
||||
|
||||
ADD_PROPERTY_TYPE(Autoconstraints,(true),"Auto Constraints",(App::PropertyType)(App::Prop_None),"Create auto constraints");
|
||||
ADD_PROPERTY_TYPE(AvoidRedundant,(true),"Auto Constraints",(App::PropertyType)(App::Prop_None),"Avoid redundant autoconstraint");
|
||||
ADD_PROPERTY_TYPE(TempoVis,(Py::None()),"Visibility automation",(App::PropertyType)(App::Prop_None),"Object that handles hiding and showing other objects when entering/leaving sketch.");
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#define SKETCHERGUI_VIEWPROVIDERSKETCH_H
|
||||
|
||||
#include <Mod/Part/Gui/ViewProvider2DObject.h>
|
||||
#include <Mod/Part/Gui/ViewProviderAttachExtension.h>
|
||||
#include <Mod/Part/App/BodyBase.h>
|
||||
#include <Inventor/SbImage.h>
|
||||
#include <Inventor/SbColor.h>
|
||||
@@ -84,7 +85,8 @@ class DrawSketchHandler;
|
||||
* of new geometry while editing.
|
||||
*/
|
||||
class SketcherGuiExport ViewProviderSketch : public PartGui::ViewProvider2DObjectGrid
|
||||
, public Gui::SelectionObserver
|
||||
, public PartGui::ViewProviderAttachExtension
|
||||
, public Gui::SelectionObserver
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(SketcherGui::ViewProviderSketch)
|
||||
/// generates a warning message about constraint conflicts and appends it to the given message
|
||||
|
||||
Reference in New Issue
Block a user