fixes 0003986: Changing view attributes does not trigger 'File changed' status
This commit is contained in:
@@ -471,6 +471,7 @@ void Document::slotNewObject(const App::DocumentObject& Obj)
|
||||
|
||||
// adding to the tree
|
||||
signalNewObject(*pcProvider);
|
||||
pcProvider->pcDocument = this;
|
||||
|
||||
// it is possible that a new viewprovider already claims children
|
||||
handleChildren3D(pcProvider);
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
/** signal on changed Object, the 2nd argument is the changed property
|
||||
of the referenced document object, not of the view provider */
|
||||
mutable boost::signals2::signal<void (const Gui::ViewProviderDocumentObject&,
|
||||
const App::Property&)> signalChangedObject;
|
||||
const App::Property&)> signalChangedObject;
|
||||
/// signal on renamed Object
|
||||
mutable boost::signals2::signal<void (const Gui::ViewProviderDocumentObject&)> signalRelabelObject;
|
||||
/// signal on activated Object
|
||||
|
||||
@@ -56,6 +56,7 @@ PROPERTY_SOURCE(Gui::ViewProviderDocumentObject, Gui::ViewProvider)
|
||||
|
||||
ViewProviderDocumentObject::ViewProviderDocumentObject()
|
||||
: pcObject(0)
|
||||
, pcDocument(0)
|
||||
{
|
||||
ADD_PROPERTY(DisplayMode,((long)0));
|
||||
ADD_PROPERTY(Visibility,(true));
|
||||
@@ -130,6 +131,9 @@ void ViewProviderDocumentObject::onChanged(const App::Property* prop)
|
||||
}
|
||||
}
|
||||
|
||||
if (pcDocument)
|
||||
pcDocument->setModified(true);
|
||||
|
||||
ViewProvider::onChanged(prop);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,10 +135,13 @@ protected:
|
||||
|
||||
protected:
|
||||
App::DocumentObject *pcObject;
|
||||
Gui::Document* pcDocument;
|
||||
|
||||
private:
|
||||
std::vector<const char*> aDisplayEnumsArray;
|
||||
std::vector<std::string> aDisplayModesArray;
|
||||
|
||||
friend class Document;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user