mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-05 09:07:39 +00:00
Load saved LAN printers when the device manager first gets an agent
When the network plugin is not yet installed at startup, on_init_network builds the DeviceManager without an agent, so its constructor skips loading the persisted LAN printers. After the plugin is installed and the network stack hot-reloads, the manager is reused via set_agent(), which never loaded them - so previously paired printers stayed missing from the device list until an app restart. Load them once a real agent first arrives.
This commit is contained in:
@@ -96,6 +96,13 @@ public:
|
||||
std::map<std::string, std::vector<std::string>> device_subseries;
|
||||
|
||||
private:
|
||||
// Load the LAN printers persisted in AppConfig into localMachineList. Runs from the
|
||||
// constructor when an agent is available and, for the case where the DeviceManager was
|
||||
// first built without one (network plugin not yet installed at startup), from set_agent()
|
||||
// once a real agent finally arrives - so paired printers survive a plugin install/hot
|
||||
// reload without an app restart.
|
||||
void load_local_machines_from_config();
|
||||
|
||||
void keep_alive();
|
||||
void check_pushing();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user