From ea2aca6fb5ae8364b325450a17be23cc270c9540 Mon Sep 17 00:00:00 2001 From: "maosheng.wei" Date: Fri, 21 Jul 2023 14:12:38 +0800 Subject: [PATCH] FIX: [STUDIO-3720] limit max_recent_count characters Change-Id: I61dd6d5adfd057c9d068ab94ce36d9ab2395002b --- src/slic3r/GUI/Preferences.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index 05707b37f2..47574ca70f 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -405,6 +405,8 @@ wxBoxSizer *PreferencesDialog::create_item_input(wxString title, wxString title2 StateColor input_bg(std::pair(wxColour("#F0F0F1"), StateColor::Disabled), std::pair(*wxWHITE, StateColor::Enabled)); input->SetBackgroundColor(input_bg); input->GetTextCtrl()->SetValue(app_config->get(param)); + wxTextValidator validator(wxFILTER_DIGITS); + input->GetTextCtrl()->SetValidator(validator); auto second_title = new wxStaticText(parent, wxID_ANY, title2, wxDefaultPosition, DESIGN_TITLE_SIZE, 0); second_title->SetForegroundColour(DESIGN_GRAY900_COLOR);