diff --git a/src/slic3r/GUI/Widgets/TextInput.cpp b/src/slic3r/GUI/Widgets/TextInput.cpp index 6752991cb3..26a1397b0b 100644 --- a/src/slic3r/GUI/Widgets/TextInput.cpp +++ b/src/slic3r/GUI/Widgets/TextInput.cpp @@ -250,6 +250,10 @@ void TextInput::DoSetSize(int x, int y, int width, int height, int sizeFlags) textPos.x += labelSize.x; if (text_ctrl) { wxSize textSize = text_ctrl->GetBestSize(); + if (textSize.y > size.y) { + // Don't allow to set internal control height more, then its initial height + textSize.y = text_ctrl->GetSize().y; + } wxClientDC dc(this); const int r_shift = int(dd_icon_size.x == 0 ? (3. * dc.GetContentScaleFactor()) : ((size.y - dd_icon_size.y) / 2)); textSize.x = size.x - textPos.x - labelSize.x - dd_icon_size.x - r_shift;