Skip to content

Commit

Permalink
macOS: remove cache hack
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Nov 6, 2024
1 parent 303aa09 commit b302962
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/app/GUI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,19 +169,7 @@ MainWindow::MainWindow(Document& document,
connect(&mDocument, &Document::documentChanged,
this, [this]() {
setFileChangedSinceSaving(true);
#ifdef Q_OS_MAC
// macOS cache hack!
// Will clear all cache on document changed instead of affected frames,
// better than nothing I guess... :/
const auto state = RenderHandler::sInstance->currentPreviewState();
const bool active = state == PreviewState::playing || state == PreviewState::rendering;
const bool paused = state == PreviewState::paused;
if (active || paused) { RenderHandler::sInstance->interruptPreview(); }
MemoryHandler::sInstance->clearMemory();
if (active) { RenderHandler::sInstance->renderPreview(); }
#else
mTimeline->stopPreview();
#endif
});
connect(&mDocument, &Document::activeSceneSet,
this, &MainWindow::updateSettingsForCurrentCanvas);
Expand Down

0 comments on commit b302962

Please sign in to comment.