FIX: auto-aranging can't restart with context button if canceled
jira: STUDIO-6027 Change-Id: Ie87caa205f98a40099c615d89a22000a378bef5c (cherry picked from commit 03e48ec5d9ac4e93c533390247a6a4a6f4ae31e8)
This commit is contained in:
parent
fc114bff4e
commit
ceaf008dd4
|
@ -614,7 +614,7 @@ static std::string concat_strings(const std::set<std::string> &strings,
|
|||
|
||||
void ArrangeJob::finalize() {
|
||||
// Ignore the arrange result if aborted.
|
||||
if (was_canceled()) return;
|
||||
if (!was_canceled()) {
|
||||
|
||||
// Unprintable items go to the last virtual bed
|
||||
int beds = 0;
|
||||
|
@ -642,8 +642,7 @@ void ArrangeJob::finalize() {
|
|||
}
|
||||
|
||||
//BBS: adjust the bed_index, create new plates, get the max bed_index
|
||||
for (ArrangePolygon& ap : m_unselected)
|
||||
{
|
||||
for (ArrangePolygon& ap : m_unselected) {
|
||||
if (ap.is_virt_object)
|
||||
continue;
|
||||
|
||||
|
@ -672,8 +671,7 @@ void ArrangeJob::finalize() {
|
|||
}
|
||||
|
||||
// Apply the arrange result to unselected objects(due to the sukodu-style column changes, the position of unselected may also be modified)
|
||||
for (ArrangePolygon& ap : m_unselected)
|
||||
{
|
||||
for (ArrangePolygon& ap : m_unselected) {
|
||||
if (ap.is_virt_object)
|
||||
continue;
|
||||
|
||||
|
@ -706,7 +704,6 @@ void ArrangeJob::finalize() {
|
|||
_L("Arrangement ignored the following objects which can't fit into a single bed:\n%s"),
|
||||
concat_strings(names, "\n")));
|
||||
}
|
||||
m_plater->get_notification_manager()->close_notification_of_type(NotificationType::ArrangeOngoing);
|
||||
|
||||
// unlock the plates we just locked
|
||||
for (int i : m_uncompatible_plates) {
|
||||
|
@ -728,7 +725,13 @@ void ArrangeJob::finalize() {
|
|||
wxGetApp().obj_list()->reload_all_plates();
|
||||
|
||||
m_plater->update();
|
||||
|
||||
m_plater->get_notification_manager()->push_notification(NotificationType::ArrangeOngoing,
|
||||
NotificationManager::NotificationLevel::RegularNotificationLevel, _u8L("Arranging done."));
|
||||
}
|
||||
else {
|
||||
m_plater->get_notification_manager()->push_notification(NotificationType::ArrangeOngoing,
|
||||
NotificationManager::NotificationLevel::RegularNotificationLevel, _u8L("Arranging canceled."));
|
||||
}
|
||||
Job::finalize();
|
||||
m_plater->m_arrange_running.store(false);
|
||||
}
|
||||
|
|
|
@ -202,19 +202,15 @@ void OrientJob::process()
|
|||
|
||||
void OrientJob::finalize() {
|
||||
// Ignore the arrange result if aborted.
|
||||
if (was_canceled()) return;
|
||||
|
||||
for (OrientMesh& mesh : m_selected)
|
||||
{
|
||||
if (!was_canceled()) {
|
||||
for (OrientMesh& mesh : m_selected) {
|
||||
mesh.apply();
|
||||
}
|
||||
|
||||
|
||||
m_plater->update();
|
||||
|
||||
// BBS
|
||||
//wxGetApp().obj_manipul()->set_dirty();
|
||||
|
||||
}
|
||||
Job::finalize();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue