FIX:The 'close' button did not call 'cancelw_coin_comor'
jira: STUDIO-10926 Change-Id: I4ded2cd930575eccfab27d62bf451eb788c90310
This commit is contained in:
parent
407e3847f5
commit
427f27ce9b
|
@ -235,12 +235,18 @@ ObjColorDialog::ObjColorDialog(wxWindow *parent, Slic3r::ObjDialogInOut &in_out,
|
|||
if (this->FindWindowById(wxID_CANCEL, this)) {
|
||||
update_ui(static_cast<wxButton*>(this->FindWindowById(wxID_CANCEL, this)));
|
||||
this->FindWindowById(wxID_CANCEL, this)->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) {
|
||||
if (!m_panel_ObjColor) { return; }
|
||||
if (m_panel_ObjColor) {
|
||||
m_panel_ObjColor->cancel_paint_color();
|
||||
}
|
||||
EndModal(wxCANCEL);
|
||||
});
|
||||
}
|
||||
this->Bind(wxEVT_CLOSE_WINDOW, [this](wxCloseEvent& e) { EndModal(wxCANCEL); });
|
||||
this->Bind(wxEVT_CLOSE_WINDOW, [this](wxCloseEvent &e) {
|
||||
if (m_panel_ObjColor) {
|
||||
m_panel_ObjColor->cancel_paint_color();
|
||||
}
|
||||
EndModal(wxCANCEL);
|
||||
});
|
||||
|
||||
wxGetApp().UpdateDlgDarkUI(this);
|
||||
CenterOnParent();
|
||||
|
@ -491,6 +497,7 @@ void ObjColorPanel::cancel_paint_color() {
|
|||
auto mv = mo->volumes[0];
|
||||
mv->mmu_segmentation_facets.reset();
|
||||
mv->config.set("extruder", 1);
|
||||
m_first_extruder_id = 1;
|
||||
}
|
||||
|
||||
void ObjColorPanel::update_filament_ids()
|
||||
|
|
|
@ -1376,11 +1376,15 @@ bool PartPlate::check_mixture_of_pla_and_petg(const DynamicPrintConfig &config)
|
|||
if (!used_filaments.empty()) {
|
||||
for (auto filament_idx : used_filaments) {
|
||||
int filament_id = filament_idx - 1;
|
||||
if (filament_id < config.option<ConfigOptionStrings>("filament_type")->values.size()) {
|
||||
std::string filament_type = config.option<ConfigOptionStrings>("filament_type")->values.at(filament_id);
|
||||
if (filament_type == "PLA")
|
||||
has_pla = true;
|
||||
if (filament_type == "PETG")
|
||||
has_petg = true;
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " check error:array bound";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue