PartDesign: add ViewProviderPython
+ bind PartDesign::Feature to PartDesign::ViewProvider, and adjust viewprovider of PartDesign::FeaturePython accordingly.
This commit is contained in:
parent
722ffe5ecb
commit
0160478242
|
@ -182,7 +182,7 @@ namespace App {
|
|||
/// @cond DOXERR
|
||||
PROPERTY_SOURCE_TEMPLATE(PartDesign::FeaturePython, PartDesign::Feature)
|
||||
template<> const char* PartDesign::FeaturePython::getViewProviderName(void) const {
|
||||
return "PartGui::ViewProviderPython";
|
||||
return "PartDesignGui::ViewProviderPython";
|
||||
}
|
||||
template<> PyObject* PartDesign::FeaturePython::getPyObject(void) {
|
||||
if (PythonObject.is(Py::_None())) {
|
||||
|
|
|
@ -70,6 +70,10 @@ public:
|
|||
|
||||
virtual PyObject* getPyObject(void);
|
||||
|
||||
virtual const char* getViewProviderName() const {
|
||||
return "PartDesignGui::ViewProvider";
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
|
|
|
@ -123,6 +123,7 @@ PyMOD_INIT_FUNC(PartDesignGui)
|
|||
|
||||
PartDesignGui::Workbench ::init();
|
||||
PartDesignGui::ViewProvider ::init();
|
||||
PartDesignGui::ViewProviderPython ::init();
|
||||
PartDesignGui::ViewProviderBody ::init();
|
||||
PartDesignGui::ViewProviderSketchBased ::init();
|
||||
PartDesignGui::ViewProviderPocket ::init();
|
||||
|
|
|
@ -251,3 +251,14 @@ void ViewProvider::makeTemporaryVisible(bool onoff)
|
|||
else
|
||||
Gui::ViewProvider::hide();
|
||||
}
|
||||
|
||||
|
||||
namespace Gui {
|
||||
/// @cond DOXERR
|
||||
PROPERTY_SOURCE_TEMPLATE(PartDesignGui::ViewProviderPython, PartDesignGui::ViewProvider);
|
||||
/// @endcond
|
||||
|
||||
// explicit template instantiation
|
||||
template class PartDesignGuiExport ViewProviderPythonFeatureT<PartDesignGui::ViewProvider>;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#define PARTGUI_ViewProvider_H
|
||||
|
||||
#include <Mod/Part/Gui/ViewProvider.h>
|
||||
#include <Gui/ViewProviderPythonFeature.h>
|
||||
|
||||
|
||||
namespace PartDesignGui {
|
||||
|
@ -75,7 +76,7 @@ protected:
|
|||
App::DocumentObject* oldTip;
|
||||
};
|
||||
|
||||
|
||||
typedef Gui::ViewProviderPythonFeatureT<ViewProvider> ViewProviderPython;
|
||||
|
||||
} // namespace PartDesignGui
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user