diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index c3f62f90d47..b767529a54d 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -16134,6 +16134,11 @@ void Plater::send_gcode_legacy(int plate_idx, Export3mfProgressFn proFn, bool us pDlg = std::make_unique(default_output_file, upload_job.printhost->get_post_upload_actions(), groups, storage_paths, storage_names, config->get_bool("open_device_tab_post_upload")); + } else if (host_type == htCrealityPrint) { + pDlg = std::make_unique(default_output_file, upload_job.printhost->get_post_upload_actions(), groups, + storage_paths, storage_names, + config->get_bool("open_device_tab_post_upload"), + upload_job.printhost.get()); } else { pDlg = std::make_unique(default_output_file, upload_job.printhost->get_post_upload_actions(), groups, storage_paths, storage_names, config->get_bool("open_device_tab_post_upload")); diff --git a/src/slic3r/GUI/PrintHostDialogs.cpp b/src/slic3r/GUI/PrintHostDialogs.cpp index f59ff23e9d0..2b040467758 100644 --- a/src/slic3r/GUI/PrintHostDialogs.cpp +++ b/src/slic3r/GUI/PrintHostDialogs.cpp @@ -28,6 +28,7 @@ #include "NotificationManager.hpp" #include "ExtraRenderers.hpp" #include "format.hpp" +#include "../Utils/CrealityPrint.hpp" namespace fs = boost::filesystem; @@ -952,4 +953,25 @@ void ElegooPrintHostSendDialog::refresh() this->Fit(); } +CrealityPrintHostSendDialog::CrealityPrintHostSendDialog(const fs::path& path, + PrintHostPostUploadActions post_actions, + const wxArrayString& groups, + const wxArrayString& storage_paths, + const wxArrayString& storage_names, + bool switch_to_device_tab, + PrintHost* printhost) + : PrintHostSendDialog(path, post_actions, groups, storage_paths, storage_names, switch_to_device_tab) + , m_printhost(printhost) +{} + +void CrealityPrintHostSendDialog::init() +{ + PrintHostSendDialog::init(); +} + +std::map CrealityPrintHostSendDialog::extendedInfo() const +{ + return {}; +} + }} diff --git a/src/slic3r/GUI/PrintHostDialogs.hpp b/src/slic3r/GUI/PrintHostDialogs.hpp index e648537ccba..f0a8a61a9aa 100644 --- a/src/slic3r/GUI/PrintHostDialogs.hpp +++ b/src/slic3r/GUI/PrintHostDialogs.hpp @@ -180,6 +180,24 @@ private: BedType m_BedType; }; +class CrealityPrintHostSendDialog : public PrintHostSendDialog +{ +public: + CrealityPrintHostSendDialog(const boost::filesystem::path& path, + PrintHostPostUploadActions post_actions, + const wxArrayString& groups, + const wxArrayString& storage_paths, + const wxArrayString& storage_names, + bool switch_to_device_tab, + PrintHost* printhost); + + virtual void init() override; + virtual std::map extendedInfo() const; + +private: + PrintHost* m_printhost; +}; + wxDECLARE_EVENT(EVT_PRINTHOST_PROGRESS, PrintHostQueueDialog::Event); wxDECLARE_EVENT(EVT_PRINTHOST_ERROR, PrintHostQueueDialog::Event); wxDECLARE_EVENT(EVT_PRINTHOST_CANCEL, PrintHostQueueDialog::Event);