+ fixes #0001963: Only write needed user data in FCSTD file if any.
This commit is contained in:
parent
00daa1cbd2
commit
8476bab7dc
|
@ -57,7 +57,7 @@ FeaturePage::FeaturePage(void) : numChildren(0)
|
|||
static const char *group = "Drawing view";
|
||||
|
||||
ADD_PROPERTY_TYPE(PageResult ,(0),group,App::Prop_Output,"Resulting SVG document of that page");
|
||||
ADD_PROPERTY_TYPE(Template ,(""),group,App::Prop_None ,"Template for the page");
|
||||
ADD_PROPERTY_TYPE(Template ,(""),group,App::Prop_Transient ,"Template for the page");
|
||||
ADD_PROPERTY_TYPE(EditableTexts,(""),group,App::Prop_None,"Substitution values for the editable strings in the template");
|
||||
}
|
||||
|
||||
|
@ -104,6 +104,12 @@ void FeaturePage::onChanged(const App::Property* prop)
|
|||
App::DocumentObjectGroup::onChanged(prop);
|
||||
}
|
||||
|
||||
void FeaturePage::onDocumentRestored()
|
||||
{
|
||||
Base::FileInfo fi(PageResult.getValue());
|
||||
Template.setValue(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + fi.fileName());
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *FeaturePage::execute(void)
|
||||
{
|
||||
std::string temp = Template.getValue();
|
||||
|
|
|
@ -64,6 +64,8 @@ public:
|
|||
protected:
|
||||
void onBeforeChange(const App::Property* prop);
|
||||
void onChanged(const App::Property* prop);
|
||||
/// get called after a document has been fully restored
|
||||
virtual void onDocumentRestored();
|
||||
|
||||
private:
|
||||
int numChildren;
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include <Base/FileInfo.h>
|
||||
#include <Base/Console.h>
|
||||
#include <App/Application.h>
|
||||
#include "LuxProject.h"
|
||||
#include "LuxFeature.h"
|
||||
#include "LuxTools.h"
|
||||
|
@ -46,10 +47,16 @@ PROPERTY_SOURCE(Raytracing::LuxProject, App::DocumentObjectGroup)
|
|||
LuxProject::LuxProject(void)
|
||||
{
|
||||
ADD_PROPERTY_TYPE(PageResult ,(0),0,App::Prop_Output,"Resulting Luxrender Scene file");
|
||||
ADD_PROPERTY_TYPE(Template ,(""),0,App::Prop_None ,"Template for the Luxrender project");
|
||||
ADD_PROPERTY_TYPE(Template ,(""),0,App::Prop_Transient ,"Template for the Luxrender project");
|
||||
ADD_PROPERTY_TYPE(Camera ,(""),0,App::Prop_None ,"Camera settings");
|
||||
}
|
||||
|
||||
void LuxProject::onDocumentRestored()
|
||||
{
|
||||
Base::FileInfo fi(PageResult.getValue());
|
||||
Template.setValue(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + fi.fileName());
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *LuxProject::execute(void)
|
||||
{
|
||||
if (std::string(PageResult.getValue()) == "")
|
||||
|
|
|
@ -59,6 +59,8 @@ public:
|
|||
const char* getViewProviderName(void) const {
|
||||
return "RaytracingGui::ViewProviderLux";
|
||||
}
|
||||
/// get called after a document has been fully restored
|
||||
virtual void onDocumentRestored();
|
||||
//@}
|
||||
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include <Base/FileInfo.h>
|
||||
#include <Base/Console.h>
|
||||
#include <App/Application.h>
|
||||
#include "RayProject.h"
|
||||
#include "RayFeature.h"
|
||||
|
||||
|
@ -45,10 +46,16 @@ PROPERTY_SOURCE(Raytracing::RayProject, App::DocumentObjectGroup)
|
|||
RayProject::RayProject(void)
|
||||
{
|
||||
ADD_PROPERTY_TYPE(PageResult ,(0),0,App::Prop_Output,"Resulting povray Project file");
|
||||
ADD_PROPERTY_TYPE(Template ,(""),0,App::Prop_None ,"Template for the Povray project");
|
||||
ADD_PROPERTY_TYPE(Template ,(""),0,App::Prop_Transient ,"Template for the Povray project");
|
||||
ADD_PROPERTY_TYPE(Camera ,(""),0,App::Prop_None ,"Camera settings");
|
||||
}
|
||||
|
||||
void RayProject::onDocumentRestored()
|
||||
{
|
||||
Base::FileInfo fi(PageResult.getValue());
|
||||
Template.setValue(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + fi.fileName());
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *RayProject::execute(void)
|
||||
{
|
||||
if (std::string(PageResult.getValue()) == "")
|
||||
|
|
|
@ -59,6 +59,8 @@ public:
|
|||
const char* getViewProviderName(void) const {
|
||||
return "RaytracingGui::ViewProviderPovray";
|
||||
}
|
||||
/// get called after a document has been fully restored
|
||||
virtual void onDocumentRestored();
|
||||
//@}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user