From 34478e69d9745df151a1b7e123540c750f81df74 Mon Sep 17 00:00:00 2001 From: garak Date: Fri, 19 Apr 2024 18:41:52 -0400 Subject: [PATCH] cleanup: resolve remaining (outdated) TODOs --- src/project.cpp | 1 - src/ui/collisionpixmapitem.cpp | 1 - src/ui/mapimageexporter.cpp | 5 +++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/project.cpp b/src/project.cpp index af5e2f2f..f74eaffe 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -440,7 +440,6 @@ Layout *Project::createNewLayout(Layout::SimpleSettings &layoutSettings) { } bool Project::loadLayout(Layout *layout) { - // !TODO: make sure this doesn't break anything, maybe do something better. new layouts work too? if (!layout->loaded) { // Force these to run even if one fails bool loadedTilesets = loadLayoutTilesets(layout); diff --git a/src/ui/collisionpixmapitem.cpp b/src/ui/collisionpixmapitem.cpp index f72e496f..e0587b08 100644 --- a/src/ui/collisionpixmapitem.cpp +++ b/src/ui/collisionpixmapitem.cpp @@ -50,7 +50,6 @@ void CollisionPixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { void CollisionPixmapItem::draw(bool ignoreCache) { if (this->layout) { - // !TODO this->layout->setCollisionItem(this); setPixmap(this->layout->renderCollision(ignoreCache)); setOpacity(*this->opacity); diff --git a/src/ui/mapimageexporter.cpp b/src/ui/mapimageexporter.cpp index 44d41f19..f649ce35 100644 --- a/src/ui/mapimageexporter.cpp +++ b/src/ui/mapimageexporter.cpp @@ -93,13 +93,14 @@ void MapImageExporter::saveImage() { break; } case ImageExporterMode::Timelapse: - // !TODO: also need layout editHistory! + // Timelapse will play in order of layout changes then map changes (events) + // TODO: potentially update in the future? QGifImage timelapseImg; timelapseImg.setDefaultDelay(timelapseDelayMs); timelapseImg.setDefaultTransparentColor(QColor(0, 0, 0)); + // lambda to avoid redundancy auto generateTimelapseFromHistory = [=, this, &timelapseImg](QString progressText, QUndoStack &historyStack){ - // QProgressDialog progress(progressText, "Cancel", 0, 1, this); progress.setAutoClose(true); progress.setWindowModality(Qt::WindowModal);