extensive changes to PresentationInfo API
[ardour.git] / libs / ardour / progress.cc
index 0679ce8a13069548d436ffeb3541db06163a6d45..0822b8e616c56130441f555f5dbfc860cc66db34 100644 (file)
@@ -24,6 +24,7 @@
 using namespace std;
 
 ARDOUR::Progress::Progress ()
+       : _cancelled (false)
 {
        descend (1);
 }
@@ -46,7 +47,9 @@ void
 ARDOUR::Progress::ascend ()
 {
        assert (!_stack.empty ());
+       float const a = _stack.back().allocation;
        _stack.pop_back ();
+       _stack.back().normalised += a;
 }
 
 /** Set the progress of the current task.
@@ -68,3 +71,15 @@ ARDOUR::Progress::set_progress (float p)
 
        set_overall_progress (overall);
 }
+
+void
+ARDOUR::Progress::cancel ()
+{
+       _cancelled = true;
+}
+
+bool
+ARDOUR::Progress::cancelled () const
+{
+       return _cancelled;
+}