1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-06 19:52:19 +01:00

BlockFile.cpp does not depend on MissingAliasFileDialog.cpp ...

... instead use a hook function to call back when it is discovered that a
block file is missing.

This frees three files from dependency cycles
This commit is contained in:
Paul Licameli
2019-05-12 13:02:23 -04:00
parent 96ffc424cf
commit ce27977ff2
3 changed files with 39 additions and 3 deletions

View File

@@ -131,3 +131,12 @@ namespace MissingAliasFilesDialog {
}
}
// Arrange callback from low levels of block file I/O to detect missing files
static struct InstallHook{ InstallHook() {
auto hook = [](const AliasBlockFile *pAliasFile){
if (!MissingAliasFilesDialog::ShouldShow())
MissingAliasFilesDialog::Mark(pAliasFile);
};
BlockFile::SetMissingAliasFileFound( hook );
} } installHook;