mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-30 11:20:32 -07:00
FIX:The 'close' button did not call 'cancelw_coin_comor'
jira: STUDIO-10926 Change-Id: I4ded2cd930575eccfab27d62bf451eb788c90310 (cherry picked from commit 427f27ce9bccef8f1ff18924e7a7ab4f23f898c0)
This commit is contained in:
parent
dd4781e47b
commit
484d3db930
2 changed files with 20 additions and 9 deletions
|
|
@ -232,12 +232,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; }
|
||||
m_panel_ObjColor->cancel_paint_color();
|
||||
EndModal(wxCANCEL);
|
||||
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();
|
||||
|
|
@ -488,6 +494,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()
|
||||
|
|
|
|||
|
|
@ -1776,11 +1776,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;
|
||||
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;
|
||||
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…
Add table
Add a link
Reference in a new issue