From 161d3f40d4b9643e25222044d98d71b8e8bfa787 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Wed, 20 Dec 2023 16:56:55 +0100 Subject: [PATCH] notification about printer change --- src/slic3r/GUI/Plater.cpp | 6 ++++++ src/slic3r/GUI/Plater.hpp | 1 + 2 files changed, 7 insertions(+) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 5a81c176cd..990fd9d169 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -5842,6 +5842,9 @@ void Plater::connect_gcode() assert(preset_id != size_t(-1)); preset_bundle->printers.select_preset(preset_id); wxGetApp().get_tab(Preset::Type::TYPE_PRINTER)->select_preset(preset->name); + p->notification_manager->close_notification_of_type(NotificationType::PrusaConnectPrinters); + p->notification_manager->push_notification(NotificationType::PrusaConnectPrinters, NotificationManager::NotificationLevel::ImportantNotificationLevel, format(_u8L("Changed Printer to %1%."), preset->name)); + select_view_3D("3D"); return; } @@ -5852,6 +5855,9 @@ void Plater::connect_gcode() assert(preset_id != size_t(-1)); preset_bundle->printers.select_preset(preset_id); wxGetApp().get_tab(Preset::Type::TYPE_PRINTER)->select_preset(preset->name); + p->notification_manager->close_notification_of_type(NotificationType::PrusaConnectPrinters); + p->notification_manager->push_notification(NotificationType::PrusaConnectPrinters, NotificationManager::NotificationLevel::ImportantNotificationLevel, format(_u8L("Changed Printer to %1%."), preset->name)); + select_view_3D("3D"); return; } diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index 915948f580..7455227597 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -224,6 +224,7 @@ public: bool is_background_process_update_scheduled() const; void suppress_background_process(const bool stop_background_process) ; void send_gcode(); + void send_gcode_inner(DynamicPrintConfig* physical_printer_config); void eject_drive(); void connect_gcode();