mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 05:52:02 +08:00
Fix for GH#12932 : Post-processing scripts disappear after editing
Fillow-up 8590e34aa
This commit is contained in:
parent
9bea31cfd2
commit
e4fc20d07c
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user