fix: snapmaker U1 SelectMachineDialog blocking print

This commit is contained in:
Ian Chua
2026-08-27 14:47:09 +08:00
parent 44941e571f
commit 34e349e323
5 changed files with 25 additions and 4 deletions
@@ -1,11 +1,13 @@
#include "SnapmakerPrinterAgent.hpp"
#include "Http.hpp"
#include "IPrinterAgent.hpp"
#include "libslic3r/PresetBundle.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "nlohmann/json.hpp"
#include <boost/log/trivial.hpp>
#include <chrono>
#include <sstream>
#include <thread>
namespace Slic3r {
@@ -271,4 +273,11 @@ bool SnapmakerPrinterAgent::fetch_filament_info(std::string dev_id, FilamentSync
return true;
}
FilamentSyncMode SnapmakerPrinterAgent::get_filament_sync_mode() const
{
if (GUI::wxGetApp().app_config->get_bool("use_printer_agents"))
return FilamentSyncMode::subscription;
return FilamentSyncMode::pull;
}
} // namespace Slic3r