Logo Search packages:      
Sourcecode: inkscape version File versions

gint sp_document_ensure_up_to_date ( SPDocument doc  ) 

Repeatedly works on getting the document updated, since sometimes it takes more than one pass to get the document updated. But it usually should not take more than a few loops, and certainly never more than 32 iterations. So we bail out if we hit 32 iterations, since this typically indicates we're stuck in an update loop.

Definition at line 782 of file document.cpp.

References SPDocument::_updateDocument(), SPDocument::modified_id, and SPDocument::uri.

Referenced by Inkscape::UI::Dialog::TileDialog::Grid_Arrange(), SPDesktop::init(), and Inkscape::Trace::Tracer::traceThread().

    int counter = 32;
    while (!doc->_updateDocument()) {
        if (counter == 0) {
            g_warning("More than 32 iteration while updating document '%s'", doc->uri);

    if (doc->modified_id) {
        /* Remove handler */
        doc->modified_id = 0;
    return counter>0;

Generated by  Doxygen 1.6.0   Back to index