Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_document_set_undo_sensitive ( SPDocument doc,
bool  sensitive 
)

Set undo sensitivity.

Note:
Since undo sensitivity needs to be nested, setting undo sensitivity should be done like this:
        bool 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 84 of file document-undo.cpp.

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

Referenced by SPDocument::_updateDocument(), and sp_export_export_clicked().

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

      if ( sensitive == doc->priv->sensitive )
            return;

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

      doc->priv->sensitive = sensitive;
}


Generated by  Doxygen 1.6.0   Back to index