Fix some errors in the PartDesign ViewProvider code
This commit is contained in:
parent
a2359adb2e
commit
3229b322ec
|
@ -37,7 +37,7 @@ namespace PartDesignGui {
|
|||
*/
|
||||
class PartDesignGuiExport ViewProviderBody : public PartGui::ViewProviderPart
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderBody);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderBody);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace PartDesignGui {
|
|||
|
||||
class PartDesignGuiExport ViewProviderGroove : public ViewProvider
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderGroove);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderGroove);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace PartDesignGui {
|
|||
|
||||
class PartDesignGuiExport ViewProviderHole : public ViewProvider
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderHole);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderHole);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
using namespace PartDesignGui;
|
||||
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderLinearPattern,PartDesignGui::ViewProvider)
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderLinearPattern,PartDesignGui::ViewProviderTransformed)
|
||||
|
||||
bool ViewProviderLinearPattern::setEdit(int ModNum)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace PartDesignGui {
|
|||
|
||||
class PartDesignGuiExport ViewProviderLinearPattern : public ViewProviderTransformed
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderLinearPattern);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderLinearPattern);
|
||||
public:
|
||||
ViewProviderLinearPattern()
|
||||
{ featureName = std::string("LinearPattern");
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace PartDesignGui {
|
|||
|
||||
class PartDesignGuiExport ViewProviderMainPart : public PartGui::ViewProviderPart
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderMainPart);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderMainPart);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
using namespace PartDesignGui;
|
||||
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderMirrored,PartDesignGui::ViewProvider)
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderMirrored,PartDesignGui::ViewProviderTransformed)
|
||||
|
||||
bool ViewProviderMirrored::setEdit(int ModNum)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace PartDesignGui {
|
|||
|
||||
class PartDesignGuiExport ViewProviderMirrored : public ViewProviderTransformed
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderMirrored);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderMirrored);
|
||||
public:
|
||||
ViewProviderMirrored()
|
||||
{ featureName = std::string("Mirrored");
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
using namespace PartDesignGui;
|
||||
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderMultiTransform,PartDesignGui::ViewProvider)
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderMultiTransform,PartDesignGui::ViewProviderTransformed)
|
||||
|
||||
bool ViewProviderMultiTransform::setEdit(int ModNum)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace PartDesignGui {
|
|||
|
||||
class PartDesignGuiExport ViewProviderMultiTransform : public ViewProviderTransformed
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderMultiTransform);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderMultiTransform);
|
||||
public:
|
||||
ViewProviderMultiTransform()
|
||||
{ featureName = std::string("MultiTransform");
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace PartDesignGui {
|
|||
|
||||
class PartDesignGuiExport ViewProviderPad : public ViewProvider
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderPad);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderPad);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
using namespace PartDesignGui;
|
||||
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderPolarPattern,PartDesignGui::ViewProvider)
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderPolarPattern,PartDesignGui::ViewProviderTransformed)
|
||||
|
||||
bool ViewProviderPolarPattern::setEdit(int ModNum)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace PartDesignGui {
|
|||
|
||||
class PartDesignGuiExport ViewProviderPolarPattern : public ViewProviderTransformed
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderPolarPattern);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderPolarPattern);
|
||||
public:
|
||||
ViewProviderPolarPattern()
|
||||
{ featureName = std::string("PolarPattern");
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace PartDesignGui {
|
|||
|
||||
class PartDesignGuiExport ViewProviderRevolution : public ViewProvider
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderRevolution);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderRevolution);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
using namespace PartDesignGui;
|
||||
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderScaled,PartDesignGui::ViewProvider)
|
||||
PROPERTY_SOURCE(PartDesignGui::ViewProviderScaled,PartDesignGui::ViewProviderTransformed)
|
||||
|
||||
bool ViewProviderScaled::setEdit(int ModNum)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace PartDesignGui {
|
|||
|
||||
class PartDesignGuiExport ViewProviderScaled : public ViewProviderTransformed
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderScaled);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderScaled);
|
||||
public:
|
||||
ViewProviderScaled()
|
||||
{ featureName = std::string("Scaled");
|
||||
|
|
|
@ -115,24 +115,7 @@ bool ViewProviderTransformed::setEdit(int ModNum)
|
|||
|
||||
void ViewProviderTransformed::unsetEdit(int ModNum)
|
||||
{
|
||||
// return to the WB we were in before editing the PartDesign feature
|
||||
Gui::Command::assureWorkbench(oldWb.c_str());
|
||||
|
||||
if (ModNum == ViewProvider::Default) {
|
||||
// when pressing ESC make sure to close the dialog
|
||||
Gui::Control().closeDialog();
|
||||
if ((PartDesignGui::ActivePartObject != NULL) && (oldTip != NULL)) {
|
||||
Gui::Selection().clearSelection();
|
||||
Gui::Selection().addSelection(oldTip->getDocument()->getName(), oldTip->getNameInDocument());
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"FreeCADGui.runCommand('PartDesign_MoveTip')");
|
||||
oldTip = NULL;
|
||||
} else {
|
||||
oldTip = NULL;
|
||||
}
|
||||
}
|
||||
else {
|
||||
PartGui::ViewProviderPart::unsetEdit(ModNum);
|
||||
}
|
||||
ViewProvider::unsetEdit(ModNum);
|
||||
|
||||
while (pcRejectedRoot->getNumChildren() > 7) {
|
||||
SoSeparator* sep = static_cast<SoSeparator*>(pcRejectedRoot->getChild(7));
|
||||
|
|
|
@ -26,19 +26,13 @@
|
|||
|
||||
#include "ViewProvider.h"
|
||||
|
||||
class SoCoordinate3;
|
||||
class SoIndexedFaceSet;
|
||||
class SoMultipleCopy;
|
||||
class SoNormal;
|
||||
class SoSeparator;
|
||||
|
||||
namespace PartDesignGui {
|
||||
|
||||
class TaskDlgTransformedParameters;
|
||||
|
||||
class PartDesignGuiExport ViewProviderTransformed : public ViewProvider
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderTransformed);
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderTransformed);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
|
|
Loading…
Reference in New Issue
Block a user