Quadtrees! (Almost)
[ipdf/code.git] / src / document.cpp
index e49e52e..76a5349 100644 (file)
@@ -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)

UCC git Repository :: git.ucc.asn.au