Inkscape::DocumentUndo should be part of SPDocument

Bug #1358808 reported by Liam P. White on 2014-08-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Inkscape currently has a class separate of SPDocument, called Inkscape::DocumentUndo, which manages undo for any given document.

This is not ideal code design — while Inkscape::DocumentUndo is technically a C++ symbol, it is not really following the ideal method for C++ as calls to Inkscape::DocumentUndo::* require one to give the document as a parameter.

Instead of continuing this behavior, I suggest that Inkscape::DocumentUndo be merged into SPDocument so that instead of giving SPDocument pointers to the function calls, the implicit 'this' pointer of the document can be used instead.

Liam P. White (liampwhite) wrote :

The current behavior is to use Inkscape::DocumentUndo like this:

DocumentUndo::done(doc, SP_VERB_CONTEXT_FOO, _("some-event"));

The suggested behavior would be this:

doc->commit(SP_VERB_CONTEXT_FOO, _("some-event"));

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers