[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1094
Date : Wed May 17 10:28:57 BST 2006
Changed paths:
M /Trunk/XaraLX/wxOil/progress.cpp
Another progress line mod
Diff:
Index: Trunk/XaraLX/wxOil/progress.cpp
===================================================================
--- Trunk/XaraLX/wxOil/progress.cpp (revision 1093)
+++ Trunk/XaraLX/wxOil/progress.cpp (revision 1094)
@@ -846,9 +846,23 @@
// Decrement the usage count. The progress display remains until the count returns to zero
ActiveDisplays--;
+
+ if (ActiveDisplays <0)
+ {
+ // This should never happen but does as Op::End() calls EndSlowJob despite
+ // BeginSlowJob() not being called first. We return immediately because Progress::Smash() is
+ // expensive and not a great thing to do on every Op.
+ ActiveDisplays = 0;
+ return;
+ }
+
+ // Return if there are active displays left
if (ActiveDisplays > 0)
return;
+ // We have zero active displays, and before the call, had a positive number, so smash the
+ // hourglass and delete the progress bar
+
if (StatusLine::Get() && StatusLine::Get()->IsProgressShown() && CurrentPercent < 97)
{
// We are showing a progress bar, but have not shown "completion" of the job (99%)
Xara