diff framework/Document.h @ 601:021d42e6c8cb

Avoid setting the session file path when loading an incomplete document, so that the default-file save-on-exit and File->Save are not activated (to avoid losing references to unfound audio files)
author Chris Cannam
date Mon, 18 Jun 2018 14:16:06 +0100
parents b23bebfdfaba
children 7d3a6357ce64
line wrap: on
line diff
--- a/framework/Document.h	Mon Jun 11 14:40:56 2018 +0100
+++ b/framework/Document.h	Mon Jun 18 14:16:06 2018 +0100
@@ -196,7 +196,7 @@
      * Get the main model (the source for playback sample rate, etc).
      */
     const WaveFileModel *getMainModel() const { return m_mainModel; }
-
+    
     std::vector<Model *> getTransformInputModels();
 
     bool isKnownModel(const Model *) const;
@@ -293,6 +293,15 @@
      */
     void alignModels();
 
+    /**
+     * Return true if any external files (most obviously audio) failed
+     * to be found on load, so that the document is incomplete
+     * compared to its saved description.
+     */
+    bool isIncomplete() const { return m_isIncomplete; }
+
+    void setIncomplete(bool i) { m_isIncomplete = i; }
+
     void toXml(QTextStream &, QString indent, QString extraAttributes) const;
     void toXmlAsTemplate(QTextStream &, QString indent, QString extraAttributes) const;
 
@@ -443,6 +452,8 @@
 
     bool m_autoAlignment;
     Align *m_align;
+
+    bool m_isIncomplete;
 };
 
 #endif