X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fdocument.cpp;h=76a534903b05accbd92df9f4f3adcbcea6c1a72b;hp=e49e52edb70e925e4f08df5a26376d4796d09cf3;hb=836513d7874d20bec7247c6dfa8b3d2c426a71d4;hpb=35e4687acd16a28fc923a75d254cdb4fd2fbc524 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)