+ make method cancelObservation() not pure virtual

This commit is contained in:
wmayer 2015-12-19 11:31:59 +01:00
parent 5b750aabe3
commit 0b0d258afd
2 changed files with 9 additions and 1 deletions

View File

@ -302,3 +302,7 @@ void DocumentObjectObserver::slotChangedObject(const App::DocumentObject&,
const App::Property&)
{
}
void DocumentObjectObserver::cancelObservation()
{
}

View File

@ -202,7 +202,11 @@ private:
virtual void slotDeletedObject(const App::DocumentObject& Obj);
/** The property of an observed object has changed */
virtual void slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop);
virtual void cancelObservation() = 0;
/** This method gets called when all observed objects are deleted or the whole document is deleted.
* This method can be re-implemented to perform an extra step like closing a dialog tht observes
* a document.
*/
virtual void cancelObservation();
private:
std::set<App::DocumentObject*> _objects;