mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-01 13:12:38 -06:00
FIX:fixed some issue with send print and ams ui
Change-Id: I1a37bad6ec1f193f9fd98c74506b3bb0358ece6d
This commit is contained in:
parent
67c2f5a285
commit
0db1b52b23
18 changed files with 292 additions and 32 deletions
|
|
@ -30,6 +30,11 @@ void GUI::Job::update_status(int st, const wxString &msg)
|
|||
wxQueueEvent(this, evt);
|
||||
}
|
||||
|
||||
void GUI::Job::update_percent_finish()
|
||||
{
|
||||
m_progress->clear_percent();
|
||||
}
|
||||
|
||||
GUI::Job::Job(std::shared_ptr<ProgressIndicator> pri)
|
||||
: m_progress(std::move(pri))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ protected:
|
|||
// status update, to be used from the work thread (process() method)
|
||||
void update_status(int st, const wxString &msg = "");
|
||||
|
||||
void update_percent_finish();
|
||||
|
||||
bool was_canceled() const { return m_canceled.load(); }
|
||||
|
||||
// Launched just before start(), a job can use it to prepare internals
|
||||
|
|
|
|||
|
|
@ -5,6 +5,11 @@ namespace Slic3r { namespace GUI {
|
|||
|
||||
NotificationProgressIndicator::NotificationProgressIndicator(NotificationManager *nm): m_nm{nm} {}
|
||||
|
||||
void NotificationProgressIndicator::clear_percent()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void NotificationProgressIndicator::set_range(int range)
|
||||
{
|
||||
m_nm->progress_indicator_set_range(range);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ public:
|
|||
|
||||
explicit NotificationProgressIndicator(NotificationManager *nm);
|
||||
|
||||
void clear_percent() override;
|
||||
void set_range(int range) override;
|
||||
void set_cancel_callback(CancelFn = CancelFn()) override;
|
||||
void set_progress(int pr) override;
|
||||
|
|
|
|||
|
|
@ -216,6 +216,7 @@ void PrintJob::process()
|
|||
}
|
||||
else if (stage == BBL::SendingPrintJobStage::PrintingStageFinished) {
|
||||
msg = wxString::Format(_L("Successfully sent. Will automatically jump to the device page in %s s"), info);
|
||||
this->update_percent_finish();
|
||||
} else {
|
||||
if (this->connection_type == "lan") {
|
||||
msg = _L("Sending print job over LAN");
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ public:
|
|||
|
||||
virtual ~ProgressIndicator() = default;
|
||||
|
||||
virtual void clear_percent() = 0;
|
||||
virtual void set_range(int range) = 0;
|
||||
virtual void set_cancel_callback(CancelFn = CancelFn()) = 0;
|
||||
virtual void set_progress(int pr) = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue