diff --git a/src/platform/qt/FrameView.cpp b/src/platform/qt/FrameView.cpp index 00cb56d0e..5c13f2b77 100644 --- a/src/platform/qt/FrameView.cpp +++ b/src/platform/qt/FrameView.cpp @@ -64,6 +64,7 @@ FrameView::FrameView(std::shared_ptr controller, QWidget* parent invalidateQueue(); }); connect(m_ui.exportButton, &QAbstractButton::pressed, this, &FrameView::exportFrame); + connect(m_ui.reset, &QAbstractButton::pressed, this, &FrameView::reset); m_backdropPicker = ColorPicker(m_ui.backdrop, QColor(0, 0, 0, 0)); connect(&m_backdropPicker, &ColorPicker::colorChanged, this, [this](const QColor& color) { @@ -432,6 +433,15 @@ void FrameView::exportFrame() { m_framebuffer.save(filename, "PNG"); } +void FrameView::reset() { + m_disabled.clear(); + for (Layer& layer : m_queue) { + layer.enabled = true; + } + m_overrideBackdrop = QColor(); + invalidateQueue(); +} + QString FrameView::LayerId::readable() const { QString typeStr; switch (type) { diff --git a/src/platform/qt/FrameView.h b/src/platform/qt/FrameView.h index cce09a42c..e47e82054 100644 --- a/src/platform/qt/FrameView.h +++ b/src/platform/qt/FrameView.h @@ -39,6 +39,7 @@ public slots: void selectLayer(const QPointF& coord); void disableLayer(const QPointF& coord); void exportFrame(); + void reset(); protected: #ifdef M_CORE_GBA diff --git a/src/platform/qt/FrameView.ui b/src/platform/qt/FrameView.ui index 8cf75ec08..80b184561 100644 --- a/src/platform/qt/FrameView.ui +++ b/src/platform/qt/FrameView.ui @@ -13,7 +13,7 @@ Inspect frame - + @@ -87,27 +87,7 @@ - - - - Disable scanline effects - - - - - - - - - - false - - - Export - - - - + true @@ -146,6 +126,33 @@ + + + + Disable scanline effects + + + + + + + + + + false + + + Export + + + + + + + Reset + + +