FIX: [STUDIO-4935] plate name edit in object list

Change-Id: I271fa217281d0c7ceca61166497136628a66681e
Jira: STUDIO-4935
This commit is contained in:
chunmao.guo
2023-11-03 09:51:01 +08:00
committed by Lane.Wei
parent b377f660a8
commit 020338b191
3 changed files with 5 additions and 4 deletions

View File

@@ -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());