X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=src%2Fdocument.cpp;h=76a534903b05accbd92df9f4f3adcbcea6c1a72b;hb=ffd290c0bc1da5aa2397fc88af9ad594f104b192;hp=e49e52edb70e925e4f08df5a26376d4796d09cf3;hpb=35e4687acd16a28fc923a75d254cdb4fd2fbc524;p=ipdf%2Fcode.git diff --git a/src/document.cpp b/src/document.cpp index e49e52e..76a5349 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -142,6 +142,12 @@ void Document::Load(const string & filename) } } Debug("Successfully loaded %u objects from \"%s\"", ObjectCount(), filename.c_str()); +#ifndef QUADTREE_DISABLED + if (m_quadtree.root_id == QUADTREE_EMPTY) + { + GenBaseQuadtree(); + } +#endif } void Document::Add(ObjectType type, const Rect & bounds, unsigned data_index)