diff -r 3dd6f343ec06 -r 353e418f161a src/document.h --- a/src/document.h Tue Jan 07 12:21:46 2014 +0200 +++ b/src/document.h Wed Jan 08 13:43:39 2014 +0200 @@ -56,16 +56,17 @@ { properties: Q_OBJECT - PROPERTY (private, QList, Objects, NO_OPS, STOCK_WRITE) - PROPERTY (private, History*, History, NO_OPS, STOCK_WRITE) - PROPERTY (private, QList, Vertices, NO_OPS, STOCK_WRITE) - PROPERTY (public, QString, Name, STR_OPS, STOCK_WRITE) - PROPERTY (public, QString, FullPath, STR_OPS, STOCK_WRITE) - PROPERTY (public, QString, DefaultName, STR_OPS, STOCK_WRITE) - PROPERTY (public, bool, Implicit, BOOL_OPS, STOCK_WRITE) - PROPERTY (public, QList, Cache, NO_OPS, STOCK_WRITE) - PROPERTY (public, long, SavePosition, NUM_OPS, STOCK_WRITE) - PROPERTY (public, QListWidgetItem*, ListItem, NO_OPS, STOCK_WRITE) + PROPERTY (private, QList, Objects, LIST_OPS, STOCK_WRITE) + PROPERTY (private, History*, History, NO_OPS, STOCK_WRITE) + PROPERTY (private, QList, Vertices, LIST_OPS, STOCK_WRITE) + PROPERTY (private, QList, References, LIST_OPS, STOCK_WRITE) + PROPERTY (public, QString, Name, STR_OPS, STOCK_WRITE) + PROPERTY (public, QString, FullPath, STR_OPS, STOCK_WRITE) + PROPERTY (public, QString, DefaultName, STR_OPS, STOCK_WRITE) + PROPERTY (public, bool, Implicit, BOOL_OPS, STOCK_WRITE) + PROPERTY (public, QList, Cache, LIST_OPS, STOCK_WRITE) + PROPERTY (public, long, SavePosition, NUM_OPS, STOCK_WRITE) + PROPERTY (public, QListWidgetItem*, ListItem, NO_OPS, STOCK_WRITE) public: LDDocument(); @@ -88,7 +89,6 @@ void setObject (int idx, LDObject* obj); void addReference (LDDocumentPointer* ptr); void removeReference (LDDocumentPointer* ptr); - int numReferences() const { return m_refs.size(); } inline LDDocument& operator<< (LDObject* obj) { @@ -136,8 +136,11 @@ friend class LDObject; private: - QList m_sel; - QList m_refs; + QList m_sel; + + // If set to true, next inline of this document discards the cache and + // re-builds it. + bool m_needsCache; static LDDocument* m_curdoc; };