MCPcopy Create free account
hub / github.com/bluescan/tacentview / DeleteImageFile

Method DeleteImageFile

Src/TacentView.cpp:3731–3750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3729
3730
3731bool Viewer::DeleteImageFile(const tString& imgFile, bool tryUseRecycleBin)
3732{
3733 // Try to find an image in the same dir that is valid.
3734 tString nextImgFile = CurrImage->Next() ? CurrImage->Next()->Filename : tString();
3735 if (nextImgFile.IsEmpty())
3736 nextImgFile = CurrImage->Prev() ? CurrImage->Prev()->Filename : tString();
3737
3738 bool deleted = tSystem::tDeleteFile(imgFile, true, tryUseRecycleBin);
3739 if (!deleted && tryUseRecycleBin)
3740 deleted = tSystem::tDeleteFile(imgFile, true, false);
3741
3742 if (deleted)
3743 {
3744 ImageToLoad = nextImgFile; // We set this so if we lose and gain focus, we go back to the current image.
3745 PopulateImages();
3746 SetCurrentImage(nextImgFile);
3747 }
3748
3749 return deleted;
3750}
3751
3752
3753bool Viewer::ChangeScreenMode(bool fullscreen, bool force)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected