diff --git a/src/slic3r/GUI/BaseTransparentDPIFrame.cpp b/src/slic3r/GUI/BaseTransparentDPIFrame.cpp index 162a3d2d67..fa2b8cab91 100644 --- a/src/slic3r/GUI/BaseTransparentDPIFrame.cpp +++ b/src/slic3r/GUI/BaseTransparentDPIFrame.cpp @@ -156,9 +156,11 @@ void BaseTransparentDPIFrame::on_hide() m_refresh_timer->Stop(); } Hide(); - if (wxGetApp().mainframe != nullptr) { - wxGetApp().mainframe->Show(); - wxGetApp().mainframe->Raise(); + auto *mainframe = wxGetApp().mainframe; + if (mainframe != nullptr) { + if (!mainframe->IsShown()) + mainframe->Show(); + mainframe->Raise(); } } @@ -296,4 +298,4 @@ void BaseTransparentDPIFrame::deal_ok() {} void BaseTransparentDPIFrame::deal_cancel(){} -}} // namespace Slic3r::GUI \ No newline at end of file +}} // namespace Slic3r::GUI