diff base/StorageAdviser.cpp @ 411:52303ec15cd2

* Permit holding Shift while dragging an instant or other edited thing, to override the initial drag resistance (for #1928943 sticky time instants) * better handling of updates during progressive decode load * ready() signal from model (used by vect)
author Chris Cannam
date Mon, 19 May 2008 17:23:11 +0000
parents 7cc6b7b0d819
children e37e44681720
line wrap: on
line diff
--- a/base/StorageAdviser.cpp	Fri May 16 13:27:07 2008 +0000
+++ b/base/StorageAdviser.cpp	Mon May 19 17:23:11 2008 +0000
@@ -28,6 +28,9 @@
 long StorageAdviser::m_memoryPlanned = 0;
 
 StorageAdviser::Recommendation
+StorageAdviser::m_baseRecommendation = StorageAdviser::NoRecommendation;
+
+StorageAdviser::Recommendation
 StorageAdviser::recommend(Criteria criteria,
 			  int minimumSize,
 			  int maximumSize)
@@ -38,6 +41,10 @@
               << ", maximumSize " << maximumSize << std::endl;
 #endif
 
+    if (m_baseRecommendation != NoRecommendation) {
+        return m_baseRecommendation; // for now
+    }
+
     QString path = TempDirectory::getInstance()->getPath();
     int discFree = GetDiscSpaceMBAvailable(path.toLocal8Bit());
     int memoryFree, memoryTotal;
@@ -194,3 +201,9 @@
 //              << m_discPlanned << std::endl;
 }
 
+void
+StorageAdviser::setFixedRecommendation(Recommendation recommendation)
+{
+    m_baseRecommendation = recommendation;
+}
+