mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-09-16 20:23:13 +08:00
TabSLAMaterial: Overridden clear_pages() to avoid a crash on re-scaling
(SPE-2322, comments)
This commit is contained in:
parent
2d87c5a9b3
commit
d8e04cfd68
@ -5494,25 +5494,6 @@ void TabSLAMaterial::update()
|
|||||||
wxGetApp().mainframe->on_config_changed(m_config);
|
wxGetApp().mainframe->on_config_changed(m_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabSLAMaterial::msw_rescale()
|
|
||||||
{
|
|
||||||
for (const auto& over_opt : m_overrides_options)
|
|
||||||
if (wxWindow* win = over_opt.second)
|
|
||||||
win->SetInitialSize(win->GetBestSize());
|
|
||||||
Tab::msw_rescale();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TabSLAMaterial::sys_color_changed()
|
|
||||||
{
|
|
||||||
Tab::sys_color_changed();
|
|
||||||
|
|
||||||
for (const auto& over_opt : m_overrides_options)
|
|
||||||
if (wxWindow* check_box = over_opt.second) {
|
|
||||||
wxGetApp().UpdateDarkUI(check_box);
|
|
||||||
CheckBox::SysColorChanged(check_box);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TabSLAMaterial::update_sla_prusa_specific_visibility()
|
void TabSLAMaterial::update_sla_prusa_specific_visibility()
|
||||||
{
|
{
|
||||||
if (m_active_page && m_active_page->title() == "Material printing profile") {
|
if (m_active_page && m_active_page->title() == "Material printing profile") {
|
||||||
@ -5532,6 +5513,33 @@ void TabSLAMaterial::update_sla_prusa_specific_visibility()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TabSLAMaterial::clear_pages()
|
||||||
|
{
|
||||||
|
Tab::clear_pages();
|
||||||
|
|
||||||
|
for (auto& over_opt : m_overrides_options)
|
||||||
|
over_opt.second = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TabSLAMaterial::msw_rescale()
|
||||||
|
{
|
||||||
|
for (const auto& over_opt : m_overrides_options)
|
||||||
|
if (wxWindow* win = over_opt.second)
|
||||||
|
win->SetInitialSize(win->GetBestSize());
|
||||||
|
Tab::msw_rescale();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TabSLAMaterial::sys_color_changed()
|
||||||
|
{
|
||||||
|
Tab::sys_color_changed();
|
||||||
|
|
||||||
|
for (const auto& over_opt : m_overrides_options)
|
||||||
|
if (wxWindow* check_box = over_opt.second) {
|
||||||
|
wxGetApp().UpdateDarkUI(check_box);
|
||||||
|
CheckBox::SysColorChanged(check_box);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void add_options_into_line(ConfigOptionsGroupShp &optgroup,
|
static void add_options_into_line(ConfigOptionsGroupShp &optgroup,
|
||||||
const std::vector<SamePair<std::string>> &prefixes,
|
const std::vector<SamePair<std::string>> &prefixes,
|
||||||
const std::string &optkey,
|
const std::string &optkey,
|
||||||
|
@ -581,6 +581,7 @@ public:
|
|||||||
void toggle_tilt_options(bool is_above);
|
void toggle_tilt_options(bool is_above);
|
||||||
void toggle_options() override;
|
void toggle_options() override;
|
||||||
void update() override;
|
void update() override;
|
||||||
|
void clear_pages() override;
|
||||||
void msw_rescale() override;
|
void msw_rescale() override;
|
||||||
void sys_color_changed() override;
|
void sys_color_changed() override;
|
||||||
bool supports_printer_technology(const PrinterTechnology tech) const override { return tech == ptSLA; }
|
bool supports_printer_technology(const PrinterTechnology tech) const override { return tech == ptSLA; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user