From 4d7715cc116b37f0889729d6550c8aa1a5034b73 Mon Sep 17 00:00:00 2001 From: "chunmao.guo" Date: Fri, 21 Jun 2024 19:55:51 +0800 Subject: [PATCH] FIX: liveview local missing ip dialog not show Change-Id: Ie15bdf0ac20354aecb2e0dffe9471e12e0143aa9 --- src/slic3r/GUI/MediaPlayCtrl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/MediaPlayCtrl.cpp b/src/slic3r/GUI/MediaPlayCtrl.cpp index 00d8082c5..c5c74a594 100644 --- a/src/slic3r/GUI/MediaPlayCtrl.cpp +++ b/src/slic3r/GUI/MediaPlayCtrl.cpp @@ -288,7 +288,6 @@ void MediaPlayCtrl::Play() return; } - m_button_play->SetIcon("media_stop"); NetworkAgent *agent = wxGetApp().getAgent(); std::string agent_version = agent ? agent->get_version() : ""; if (m_lan_proto > MachineObject::LVL_Disable && (m_lan_mode || !m_remote_support) && !m_disable_lan && !m_lan_ip.empty()) { @@ -308,6 +307,7 @@ void MediaPlayCtrl::Play() BOOST_LOG_TRIVIAL(info) << "MediaPlayCtrl: " << hide_passwd(hide_id_middle_string(url, url.find(m_lan_ip), m_lan_ip.length()), {m_lan_passwd}); m_url = url; load(); + m_button_play->SetIcon("media_stop"); return; } @@ -420,7 +420,7 @@ void MediaPlayCtrl::Stop(wxString const &msg) } auto tunnel = m_url.empty() ? "" : into_u8(wxURI(m_url).GetPath()).substr(1); - if (auto n = tunnel.find_first_of('/_'); n != std::string::npos) + if (auto n = tunnel.find_first_of("/_"); n != std::string::npos) tunnel = tunnel.substr(0, n); if (last_state != wxMEDIASTATE_PLAYING && m_failed_code != 0 && m_last_failed_codes.find(m_failed_code) == m_last_failed_codes.end() @@ -658,7 +658,7 @@ void MediaPlayCtrl::onStateChanged(wxMediaEvent &event) j["result"] = "success"; j["code"] = 0; auto tunnel = into_u8(wxURI(m_url).GetPath()).substr(1); - if (auto n = tunnel.find_first_of('/_'); n != std::string::npos) + if (auto n = tunnel.find_first_of("/_"); n != std::string::npos) tunnel = tunnel.substr(0, n); j["tunnel"] = tunnel; if (tunnel == "tutk") {