Fix for GH#12932 : Post-processing scripts disappear after editing

Fillow-up 8590e34aa
This commit is contained in:
YuSanka 2024-07-17 14:11:54 +02:00 committed by Lukas Matena
parent 9bea31cfd2
commit e4fc20d07c

View File

@ -250,6 +250,10 @@ void TextInput::DoSetSize(int x, int y, int width, int height, int sizeFlags)
textPos.x += labelSize.x; textPos.x += labelSize.x;
if (text_ctrl) { if (text_ctrl) {
wxSize textSize = text_ctrl->GetBestSize(); 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); wxClientDC dc(this);
const int r_shift = int(dd_icon_size.x == 0 ? (3. * dc.GetContentScaleFactor()) : ((size.y - dd_icon_size.y) / 2)); 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; textSize.x = size.x - textPos.x - labelSize.x - dd_icon_size.x - r_shift;