[TD]fix Symbol update on property change

This commit is contained in:
Wanderer Fan
2022-07-27 18:31:27 -04:00
committed by WandererFan
parent 91cffca077
commit 0805d284d5
4 changed files with 126 additions and 165 deletions

View File

@@ -23,18 +23,21 @@
#ifndef _DrawViewSymbol_h_
#define _DrawViewSymbol_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <QDomDocument>
#include <QXmlResultItems>
#include <App/DocumentObject.h>
#include <App/FeaturePython.h>
#include <Base/BoundBox.h>
#include "DrawView.h"
namespace TechDraw
{
class DrawPage;
class TechDrawExport DrawViewSymbol : public TechDraw::DrawView
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewSymbol);
@@ -63,12 +66,13 @@ public:
//return PyObject as DrawViewSymbolPy
virtual PyObject *getPyObject(void) override;
virtual short mustExecute() const override;
protected:
virtual void onChanged(const App::Property* prop) override;
Base::BoundBox3d bbox;
std::vector<std::string> getEditableFields();
void updateFieldsInSymbol();
bool loadQDomDocument(QDomDocument& symbolDocument);
};
typedef App::FeaturePythonT<DrawViewSymbol> DrawViewSymbolPython;