+ do some code clean up
+ adjust type id according to inheritance of view providers git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5111 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
parent
5f907d1278
commit
6a9dff8129
|
@ -185,14 +185,6 @@ public:
|
||||||
Transform,
|
Transform,
|
||||||
Cutting,
|
Cutting,
|
||||||
Color,
|
Color,
|
||||||
Mirror
|
|
||||||
//FIXME: Never do such stuff in the base system
|
|
||||||
/*,
|
|
||||||
Fillet,
|
|
||||||
Sketch,
|
|
||||||
Pad,
|
|
||||||
Pocket,
|
|
||||||
Revolve*/
|
|
||||||
};
|
};
|
||||||
protected:
|
protected:
|
||||||
/// is called by the document when the provider goes in edit mode
|
/// is called by the document when the provider goes in edit mode
|
||||||
|
|
|
@ -65,13 +65,13 @@ void ViewProviderMirror::setupContextMenu(QMenu* menu, QObject* receiver, const
|
||||||
{
|
{
|
||||||
QAction* act;
|
QAction* act;
|
||||||
act = menu->addAction(QObject::tr("Edit mirror plane"), receiver, member);
|
act = menu->addAction(QObject::tr("Edit mirror plane"), receiver, member);
|
||||||
act->setData(QVariant((int)ViewProvider::Mirror));
|
act->setData(QVariant((int)ViewProvider::Default));
|
||||||
ViewProviderPart::setupContextMenu(menu, receiver, member);
|
ViewProviderPart::setupContextMenu(menu, receiver, member);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ViewProviderMirror::setEdit(int ModNum)
|
bool ViewProviderMirror::setEdit(int ModNum)
|
||||||
{
|
{
|
||||||
if (ModNum == ViewProvider::Default || ModNum == ViewProvider::Mirror) {
|
if (ModNum == ViewProvider::Default) {
|
||||||
// get the properties from the mirror feature
|
// get the properties from the mirror feature
|
||||||
Part::Mirroring* mf = static_cast<Part::Mirroring*>(getObject());
|
Part::Mirroring* mf = static_cast<Part::Mirroring*>(getObject());
|
||||||
Base::BoundBox3d bbox = mf->Shape.getBoundingBox();
|
Base::BoundBox3d bbox = mf->Shape.getBoundingBox();
|
||||||
|
@ -134,7 +134,7 @@ bool ViewProviderMirror::setEdit(int ModNum)
|
||||||
|
|
||||||
void ViewProviderMirror::unsetEdit(int ModNum)
|
void ViewProviderMirror::unsetEdit(int ModNum)
|
||||||
{
|
{
|
||||||
if (ModNum == ViewProvider::Default || ModNum == ViewProvider::Mirror) {
|
if (ModNum == ViewProvider::Default) {
|
||||||
SoCenterballManip* manip = static_cast<SoCenterballManip *>(pcEditNode->getChild(0));
|
SoCenterballManip* manip = static_cast<SoCenterballManip *>(pcEditNode->getChild(0));
|
||||||
|
|
||||||
SbVec3f move = manip->translation.getValue();
|
SbVec3f move = manip->translation.getValue();
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
using namespace PartDesignGui;
|
using namespace PartDesignGui;
|
||||||
|
|
||||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderHole,PartGui::ViewProviderPart)
|
PROPERTY_SOURCE(PartDesignGui::ViewProviderHole,PartDesignGui::ViewProvider)
|
||||||
|
|
||||||
ViewProviderHole::ViewProviderHole()
|
ViewProviderHole::ViewProviderHole()
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
using namespace PartDesignGui;
|
using namespace PartDesignGui;
|
||||||
|
|
||||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderPad,PartGui::ViewProviderPart)
|
PROPERTY_SOURCE(PartDesignGui::ViewProviderPad,PartDesignGui::ViewProvider)
|
||||||
|
|
||||||
ViewProviderPad::ViewProviderPad()
|
ViewProviderPad::ViewProviderPad()
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
using namespace PartDesignGui;
|
using namespace PartDesignGui;
|
||||||
|
|
||||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderPatternRectangular,PartGui::ViewProviderPart)
|
PROPERTY_SOURCE(PartDesignGui::ViewProviderPatternRectangular,PartDesignGui::ViewProvider)
|
||||||
|
|
||||||
ViewProviderPatternRectangular::ViewProviderPatternRectangular()
|
ViewProviderPatternRectangular::ViewProviderPatternRectangular()
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
using namespace PartDesignGui;
|
using namespace PartDesignGui;
|
||||||
|
|
||||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderRevolution,PartGui::ViewProviderPart)
|
PROPERTY_SOURCE(PartDesignGui::ViewProviderRevolution,PartDesignGui::ViewProvider)
|
||||||
|
|
||||||
ViewProviderRevolution::ViewProviderRevolution()
|
ViewProviderRevolution::ViewProviderRevolution()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user