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

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 64 iterations. So we bail out if we hit 64 iterations, since this typically indicates we're stuck in an update loop.

Definition at line 915 of file document.cpp.

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

Referenced by Inkscape::UI::ClipboardManagerImpl::_pasteDocument(), file_import(), Inkscape::UI::Dialog::TileDialog::Grid_Arrange(), SPDesktop::init(), SPItem::setCenter(), sp_file_open(), sp_flood_do_flood_fill(), sp_marker_prev_new(), sp_selection_set_mask(), and Inkscape::Trace::Tracer::traceThread().

    int counter = 64;
    while (!doc->_updateDocument()) {
        if (counter == 0) {
            g_warning("More than 64 iteration while updating document '%s'", doc->uri? doc->uri:"<unknown URI, probably clipboard>");

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

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index