mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-16 22:51:51 -06:00
Slicing progress notification cancel button hides notification if process is idle.
This commit is contained in:
parent
9d7549e661
commit
7dabcf0646
3 changed files with 16 additions and 8 deletions
|
@ -1176,7 +1176,9 @@ void NotificationManager::SlicingProgressNotification::set_sidebar_collapsed(boo
|
|||
void NotificationManager::SlicingProgressNotification::on_cancel_button()
|
||||
{
|
||||
if (m_cancel_callback){
|
||||
m_cancel_callback();
|
||||
if (!m_cancel_callback()) {
|
||||
set_progress_state(SlicingProgressState::SP_NO_SLICING);
|
||||
}
|
||||
}
|
||||
}
|
||||
int NotificationManager::SlicingProgressNotification::get_duration()
|
||||
|
@ -1681,7 +1683,7 @@ void NotificationManager::upload_job_notification_show_error(int id, const std::
|
|||
}
|
||||
}
|
||||
|
||||
void NotificationManager::init_slicing_progress_notification(std::function<void()> cancel_callback)
|
||||
void NotificationManager::init_slicing_progress_notification(std::function<bool()> cancel_callback)
|
||||
{
|
||||
for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
|
||||
if (notification->get_type() == NotificationType::SlicingProgress) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue