CanDelete is necessary for dimensions
- therefore revert commit bd0bf690b53f8355400278a127524029d225dffb. - handle balloons the same way - fix line ending in ViewProviderProjGroupItem.cpp
This commit is contained in:
@@ -180,3 +180,11 @@ void ViewProviderBalloon::handleChangedPropertyType(Base::XMLReader &reader, con
|
||||
LineWidth.setValue(LineWidthProperty.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
bool ViewProviderBalloon::canDelete(App::DocumentObject *obj) const
|
||||
{
|
||||
// deletions of a balloon object doesn't destroy anything
|
||||
// thus we can pass this action
|
||||
Q_UNUSED(obj)
|
||||
return true;
|
||||
}
|
||||
@@ -60,6 +60,7 @@ public:
|
||||
virtual bool setEdit(int ModNum);
|
||||
virtual void unsetEdit(int ModNum);
|
||||
virtual bool doubleClicked(void);
|
||||
virtual bool canDelete(App::DocumentObject* obj) const;
|
||||
|
||||
virtual TechDraw::DrawViewBalloon* getViewObject() const;
|
||||
|
||||
|
||||
@@ -221,3 +221,11 @@ void ViewProviderDimension::handleChangedPropertyType(Base::XMLReader &reader, c
|
||||
LineWidth.setValue(LineWidthProperty.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
bool ViewProviderDimension::canDelete(App::DocumentObject *obj) const
|
||||
{
|
||||
// deletions of dimension objects don't destroy anything
|
||||
// thus we can pass this action
|
||||
Q_UNUSED(obj)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@ public:
|
||||
double prefFontSize() const;
|
||||
double prefWeight() const;
|
||||
int prefStandardAndStyle() const;
|
||||
virtual bool canDelete(App::DocumentObject* obj) const;
|
||||
|
||||
protected:
|
||||
virtual void handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property * prop);
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawProjGroup.h>
|
||||
#include <Mod/TechDraw/App/DrawProjGroup.h>
|
||||
#include <Mod/TechDraw/App/DrawProjGroupItem.h>
|
||||
|
||||
#include "ViewProviderProjGroupItem.h"
|
||||
@@ -153,7 +153,7 @@ bool ViewProviderProjGroupItem::onDelete(const std::vector<std::string> &)
|
||||
bool isAnchor = false;
|
||||
|
||||
// get the item and group
|
||||
TechDraw::DrawProjGroupItem* dpgi = static_cast<TechDraw::DrawProjGroupItem*>(getViewObject());
|
||||
TechDraw::DrawProjGroupItem* dpgi = static_cast<TechDraw::DrawProjGroupItem*>(getViewObject());
|
||||
TechDraw::DrawProjGroup* dpg = dpgi->getPGroup();
|
||||
// get the projection
|
||||
TechDraw::DrawProjGroupItem* proj = getObject();
|
||||
|
||||
Reference in New Issue
Block a user