mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-05 21:06:02 +08:00
FIX: The cancel button should not make plate name valid
Change-Id: Id2b3935e87d443f5a594fdd588a63e502c0321e5
This commit is contained in:
parent
060b41707e
commit
9b980c9bc6
@ -246,9 +246,6 @@ PlateNameEditDialog::PlateNameEditDialog(wxWindow *parent, wxWindowID id, const
|
||||
m_button_ok->SetMinSize(wxSize(FromDIP(58), FromDIP(24)));
|
||||
m_button_ok->SetCornerRadius(FromDIP(12));
|
||||
m_button_ok->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) {
|
||||
wxCommandEvent evt(EVT_SET_BED_TYPE_CONFIRM, GetId());
|
||||
e.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(evt);
|
||||
if (this->IsModal())
|
||||
EndModal(wxID_YES);
|
||||
else
|
||||
|
@ -12168,12 +12168,11 @@ int Plater::select_plate_by_hover_id(int hover_id, bool right_click, bool isModi
|
||||
wxString curr_plate_name = from_u8(curr_plate->get_plate_name());
|
||||
dlg.set_plate_name(curr_plate_name);
|
||||
|
||||
dlg.ShowModal();
|
||||
|
||||
wxString dlg_plate_name = dlg.get_plate_name();
|
||||
curr_plate->set_plate_name(dlg_plate_name.ToUTF8().data());
|
||||
|
||||
this->schedule_background_process();
|
||||
int result=dlg.ShowModal();
|
||||
if (result == wxID_YES) {
|
||||
wxString dlg_plate_name = dlg.get_plate_name();
|
||||
curr_plate->set_plate_name(dlg_plate_name.ToUTF8().data());
|
||||
}
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << "can not select plate %1%" << plate_index;
|
||||
ret = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user