9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz * Set undo sensitivity.
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz * Since undo sensitivity needs to be nested, setting undo sensitivity
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz * should be done like this:
a63dbee6633e3ed991bb2b34cbed7c9f02c1a839Jon A. Cruz bool saved = DocumentUndo::getUndoSensitive(document);
a63dbee6633e3ed991bb2b34cbed7c9f02c1a839Jon A. Cruz DocumentUndo::setUndoSensitive(document, false);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz ... do stuff ...
a63dbee6633e3ed991bb2b34cbed7c9f02c1a839Jon A. Cruz DocumentUndo::setUndoSensitive(document, saved); \endverbatim
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static void setUndoSensitive(SPDocument *doc, bool sensitive);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static bool getUndoSensitive(SPDocument const *document);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static void done(SPDocument *document, unsigned int event_type, Glib::ustring const &event_description);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz static void maybeDone(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring const &event_description);
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz} // namespace Inkscape
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz#endif // SEEN_SP_DOCUMENT_UNDO_H
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz Local Variables:
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz c-file-style:"stroustrup"
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz indent-tabs-mode:nil
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz fill-column:99
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :