1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-19 17:11:12 +02:00

Now that each stack frame on the Undo stack does CalculateSpaceUsage when created, make sure the blockfile's file exists before asking for the calculation.

This commit is contained in:
v.audacity
2010-08-10 05:16:05 +00:00
parent 0ae919f656
commit b15b3d49ed

View File

@@ -64,8 +64,10 @@ wxLongLong UndoManager::CalculateSpaceUsage(int index)
while (wt) {
for (it = wt->GetClipIterator(); it; it = it->GetNext()) {
blocks = it->GetData()->GetSequenceBlockArray();
for (i = 0; i < blocks->GetCount(); i++) {
cur[blocks->Item(i)->f] = blocks->Item(i)->f->GetSpaceUsage();
for (i = 0; i < blocks->GetCount(); i++)
{
if (blocks->Item(i)->f->GetFileName().FileExists())
cur[blocks->Item(i)->f] = blocks->Item(i)->f->GetSpaceUsage();
}
}
wt = (WaveTrack *) iter.Next();