Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

void sp_document_set_undo_sensitive ( SPDocument doc,
gboolean  sensitive 

Set undo sensitivity.

Since undo sensitivity needs to be nested, setting undo sensitivity should be done like this:
        gboolean saved = sp_document_get_undo_sensitive(document);
        sp_document_set_undo_sensitive(document, FALSE);
        ... do stuff ...
        sp_document_set_undo_sensitive(document, saved);  

Definition at line 88 of file document-undo.cpp.

References SPDocument::priv, and SPDocument::rdoc.

Referenced by Inkscape::Whiteboard::SessionManager::receiveChange(), set_doc_units(), sp_dtw_border_layer_toggled(), sp_dtw_whatever_changed(), sp_dtw_whatever_toggled(), and sp_export_export_clicked().

      g_assert (doc != NULL);
      g_assert (doc->priv != NULL);

      if ( !(sensitive) == !(doc->priv->sensitive) )

      if (sensitive) {
            sp_repr_begin_transaction (doc->rdoc);
      } else {
            doc->priv->partial = sp_repr_coalesce_log (
                  sp_repr_commit_undoable (doc->rdoc)

      doc->priv->sensitive = !!sensitive;

Generated by  Doxygen 1.6.0   Back to index