| 3729 | |
| 3730 | |
| 3731 | bool 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 | |
| 3753 | bool Viewer::ChangeScreenMode(bool fullscreen, bool force) |
nothing calls this directly
no outgoing calls
no test coverage detected