From 41d58af9489773678925e13ffc1ecd9470709d12 Mon Sep 17 00:00:00 2001 From: "chunmao.guo" Date: Sun, 18 Feb 2024 17:04:11 +0800 Subject: [PATCH] FIX: file proto error message Change-Id: I2c4117961c615e424780fb3830441e6a93c50bcc Jira: none --- src/slic3r/GUI/MediaFilePanel.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/slic3r/GUI/MediaFilePanel.cpp b/src/slic3r/GUI/MediaFilePanel.cpp index 945c48f3a..9c24f672d 100644 --- a/src/slic3r/GUI/MediaFilePanel.cpp +++ b/src/slic3r/GUI/MediaFilePanel.cpp @@ -438,7 +438,7 @@ void MediaFilePanel::fetchUrl(boost::weak_ptr wfs) m_waiting_enable = false; if (!m_local_support && !m_remote_support) { m_waiting_support = true; - m_image_grid->SetStatus(m_bmp_failed, _L("Please update the printer firmware and try again.")); + m_image_grid->SetStatus(m_bmp_failed, _L("Browsing file in SD card is not supported in current firmware. Please update the printer firmware.")); fs->SetUrl("0"); return; } @@ -459,14 +459,19 @@ void MediaFilePanel::fetchUrl(boost::weak_ptr wfs) fs->SetUrl(url); return; } - if (m_lan_mode) { - m_image_grid->SetStatus(m_bmp_failed, _L("Problem occured. Please update the printer firmware and try again.")); - fs->SetUrl("0"); - return; - } if (!m_remote_support && m_local_support) { // not support tutk m_image_grid->SetStatus(m_bmp_failed, _L("Please enter the IP of printer to connect.")); - fs->SetUrl("1"); + fs->SetUrl("0"); + fs.reset(); + if (wxGetApp().show_modal_ip_address_enter_dialog(_L("LAN Connection Failed (Failed to view sdcard)"))) { + if (auto fs = wfs.lock()) + fs->Retry(); + } + return; + } + if (m_lan_mode) { + m_image_grid->SetStatus(m_bmp_failed, _L("Browsing file in SD card is not supported in LAN Only Mode.")); + fs->SetUrl("0"); return; } NetworkAgent *agent = wxGetApp().getAgent();