Optimize Device

This commit is contained in:
QIDI TECH
2024-09-20 18:07:25 +08:00
parent 007578e041
commit 18a0c7bd80
6 changed files with 20 additions and 11 deletions

View File

@@ -282,7 +282,6 @@ void PrinterWebView::CreatThread() {
break;
BOOST_LOG_TRIVIAL(error) << "machine IP: " << (button->getIPLabel());
std::unique_ptr<PrintHost> printhost(
PrintHost::get_print_host_url((button->getIPLabel()).ToStdString(), (button->getIPLabel()).ToStdString()));
if (!printhost) {
@@ -482,13 +481,6 @@ void PrinterWebView::SetLoginStatus(bool status) {
//y5
std::string head_name = wxGetApp().app_config->get("user_head_name");
wxString head_savePath = (boost::filesystem::path(Slic3r::data_dir()) / "user" / head_name).make_preferred().string();
std::ifstream file(head_savePath);
if (file.good()) {
file.close();
remove(head_savePath.c_str());
}
wxGetApp().app_config->set("user_head_url", "");
wxGetApp().app_config->set("user_head_name", "");
m_user_head_name = "";
SetPresetChanged(true);
UpdateState();

View File

@@ -45,6 +45,9 @@
#include <boost/thread.hpp>
#include "./Widgets/SwitchButton.hpp"
#include "./Widgets/DeviceButton.hpp"
#include "../Utils/Moonraker.hpp"
namespace Slic3r {
namespace GUI {
@@ -106,9 +109,12 @@ public:
void StopStatusThread()
{
m_stopThread = true;
//y6
Moonraker::m_isStop = true;
if (m_statusThread.joinable()) {
m_statusThread.join();
}
Moonraker::m_isStop = false;
};
void SetPauseThread(bool status) { m_pauseThread = status; };
void SetPresetChanged(bool status);