FIX: [STUDIO-4935] plate name edit in object list
Change-Id: I271fa217281d0c7ceca61166497136628a66681e Jira: STUDIO-4935
This commit is contained in:
parent
b377f660a8
commit
020338b191
|
@ -225,7 +225,8 @@ wxWindow* BitmapTextRenderer::CreateEditorCtrl(wxWindow* parent, wxRect labelRec
|
|||
bool BitmapTextRenderer::GetValueFromEditorCtrl(wxWindow* ctrl, wxVariant& value)
|
||||
{
|
||||
wxTextCtrl* text_editor = wxDynamicCast(ctrl, wxTextCtrl);
|
||||
if (!text_editor || text_editor->GetValue().IsEmpty())
|
||||
auto item = GetView()->GetModel()->GetParent(m_item);
|
||||
if (!text_editor || (item.IsOk() && text_editor->GetValue().IsEmpty()))
|
||||
return false;
|
||||
|
||||
m_was_unusable_symbol = Slic3r::GUI::Plater::has_illegal_filename_characters(text_editor->GetValue());
|
||||
|
|
|
@ -5584,7 +5584,7 @@ void GUI::ObjectList::OnStartEditing(wxDataViewEvent &event)
|
|||
int plate_idx = node->GetPlateIdx();
|
||||
if (plate_idx >= 0) {
|
||||
auto plate = wxGetApp().plater()->get_partplate_list().get_plate(plate_idx);
|
||||
m_objects_model->SetName(plate->get_plate_name(), GetSelection());
|
||||
m_objects_model->SetName(from_u8(plate->get_plate_name()), GetSelection());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5033,9 +5033,9 @@ void Tab::delete_preset()
|
|||
presets += "\n - " + preset2.name;
|
||||
}
|
||||
if (count > 0) {
|
||||
msg = _L("Presets inherited by other presets cannot be deleted");
|
||||
msg = _L("Presets inherited by other presets can not be deleted!");
|
||||
msg += "\n";
|
||||
msg += _L_PLURAL("The following presets inherits this preset.",
|
||||
msg += _L_PLURAL("The following presets inherit this preset.",
|
||||
"The following preset inherits this preset.", count);
|
||||
wxString title = from_u8((boost::format(_utf8(L("%1% Preset"))) % action).str()); // action + _(L(" Preset"));
|
||||
MessageDialog(parent(), msg + presets, title, wxOK | wxICON_ERROR).ShowModal();
|
||||
|
|
Loading…
Reference in New Issue