FIX:reload paint after background process apply
Jira: STUDIO-6493 Change-Id: I9a1986152f05163f236f58bb24210b690ca3d562
This commit is contained in:
parent
3c12eb63de
commit
a8faade43f
|
@ -5930,6 +5930,7 @@ void ObjectList::toggle_printable_state()
|
||||||
|
|
||||||
// update scene
|
// update scene
|
||||||
wxGetApp().plater()->update();
|
wxGetApp().plater()->update();
|
||||||
|
wxGetApp().plater()->reload_paint_after_background_process_apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
ModelObject* ObjectList::object(const int obj_idx) const
|
ModelObject* ObjectList::object(const int obj_idx) const
|
||||||
|
|
|
@ -107,6 +107,7 @@ class Preview : public wxPanel
|
||||||
const Slic3r::PrintBase* m_loaded_print { nullptr };
|
const Slic3r::PrintBase* m_loaded_print { nullptr };
|
||||||
//BBS: add only gcode mode
|
//BBS: add only gcode mode
|
||||||
bool m_only_gcode { false };
|
bool m_only_gcode { false };
|
||||||
|
bool m_reload_paint_after_background_process_apply{false};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum class OptionType : unsigned int
|
enum class OptionType : unsigned int
|
||||||
|
@ -160,6 +161,8 @@ public:
|
||||||
void show_sliders(bool show = true);
|
void show_sliders(bool show = true);
|
||||||
void show_moves_sliders(bool show = true);
|
void show_moves_sliders(bool show = true);
|
||||||
void show_layers_sliders(bool show = true);
|
void show_layers_sliders(bool show = true);
|
||||||
|
void set_reload_paint_after_background_process_apply(bool flag) { m_reload_paint_after_background_process_apply = flag; }
|
||||||
|
bool get_reload_paint_after_background_process_apply() { return m_reload_paint_after_background_process_apply; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool init(wxWindow* parent, Bed3D& bed, Model* model);
|
bool init(wxWindow* parent, Bed3D& bed, Model* model);
|
||||||
|
|
|
@ -4963,6 +4963,12 @@ unsigned int Plater::priv::update_background_process(bool force_validation, bool
|
||||||
|
|
||||||
notification_manager->set_slicing_progress_hidden();
|
notification_manager->set_slicing_progress_hidden();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (preview && preview->get_reload_paint_after_background_process_apply()) {
|
||||||
|
preview->set_reload_paint_after_background_process_apply(false);
|
||||||
|
preview->reload_print();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((invalidated != Print::APPLY_STATUS_UNCHANGED || force_validation) && ! background_process.empty()) {
|
if ((invalidated != Print::APPLY_STATUS_UNCHANGED || force_validation) && ! background_process.empty()) {
|
||||||
// The delayed error message is no more valid.
|
// The delayed error message is no more valid.
|
||||||
|
@ -10419,6 +10425,10 @@ void Plater::select_view(const std::string& direction) { p->select_view(directio
|
||||||
//BBS: add no_slice logic
|
//BBS: add no_slice logic
|
||||||
void Plater::select_view_3D(const std::string& name, bool no_slice) { p->select_view_3D(name, no_slice); }
|
void Plater::select_view_3D(const std::string& name, bool no_slice) { p->select_view_3D(name, no_slice); }
|
||||||
|
|
||||||
|
void Plater::reload_paint_after_background_process_apply() {
|
||||||
|
p->preview->set_reload_paint_after_background_process_apply(true);
|
||||||
|
}
|
||||||
|
|
||||||
bool Plater::is_preview_shown() const { return p->is_preview_shown(); }
|
bool Plater::is_preview_shown() const { return p->is_preview_shown(); }
|
||||||
bool Plater::is_preview_loaded() const { return p->is_preview_loaded(); }
|
bool Plater::is_preview_loaded() const { return p->is_preview_loaded(); }
|
||||||
bool Plater::is_view3D_shown() const { return p->is_view3D_shown(); }
|
bool Plater::is_view3D_shown() const { return p->is_view3D_shown(); }
|
||||||
|
|
|
@ -296,6 +296,7 @@ public:
|
||||||
//BBS: add no_slice logic
|
//BBS: add no_slice logic
|
||||||
void select_view_3D(const std::string& name, bool no_slice = true);
|
void select_view_3D(const std::string& name, bool no_slice = true);
|
||||||
|
|
||||||
|
void reload_paint_after_background_process_apply();
|
||||||
bool is_preview_shown() const;
|
bool is_preview_shown() const;
|
||||||
bool is_preview_loaded() const;
|
bool is_preview_loaded() const;
|
||||||
bool is_view3D_shown() const;
|
bool is_view3D_shown() const;
|
||||||
|
|
Loading…
Reference in New Issue