+ 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,
|
||||
Cutting,
|
||||
Color,
|
||||
Mirror
|
||||
//FIXME: Never do such stuff in the base system
|
||||
/*,
|
||||
Fillet,
|
||||
Sketch,
|
||||
Pad,
|
||||
Pocket,
|
||||
Revolve*/
|
||||
};
|
||||
protected:
|
||||
/// 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;
|
||||
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);
|
||||
}
|
||||
|
||||
bool ViewProviderMirror::setEdit(int ModNum)
|
||||
{
|
||||
if (ModNum == ViewProvider::Default || ModNum == ViewProvider::Mirror) {
|
||||
if (ModNum == ViewProvider::Default) {
|
||||
// get the properties from the mirror feature
|
||||
Part::Mirroring* mf = static_cast<Part::Mirroring*>(getObject());
|
||||
Base::BoundBox3d bbox = mf->Shape.getBoundingBox();
|
||||
|
@ -134,7 +134,7 @@ bool ViewProviderMirror::setEdit(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));
|
||||
|
||||
SbVec3f move = manip->translation.getValue();
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
using namespace PartDesignGui;
|
||||
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderHole,PartGui::ViewProviderPart)
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderHole,PartDesignGui::ViewProvider)
|
||||
|
||||
ViewProviderHole::ViewProviderHole()
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
using namespace PartDesignGui;
|
||||
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderPad,PartGui::ViewProviderPart)
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderPad,PartDesignGui::ViewProvider)
|
||||
|
||||
ViewProviderPad::ViewProviderPad()
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
using namespace PartDesignGui;
|
||||
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderPatternRectangular,PartGui::ViewProviderPart)
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderPatternRectangular,PartDesignGui::ViewProvider)
|
||||
|
||||
ViewProviderPatternRectangular::ViewProviderPatternRectangular()
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
using namespace PartDesignGui;
|
||||
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderRevolution,PartGui::ViewProviderPart)
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderRevolution,PartDesignGui::ViewProvider)
|
||||
|
||||
ViewProviderRevolution::ViewProviderRevolution()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user