diff options
author | frosch <frosch@openttd.org> | 2013-06-11 18:36:26 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-06-11 18:36:26 +0000 |
commit | 9cb89b363993f880da5cd3c53533227bd0af3e9a (patch) | |
tree | 15318840c19fd301903f35c938522179cfad4572 /src/airport_gui.cpp | |
parent | c73219f9e5a640a07b1ec6b6e4b875aaf7304eb2 (diff) | |
download | openttd-9cb89b363993f880da5cd3c53533227bd0af3e9a.tar.xz |
(svn r25395) -Fix [FS#5596]: The size of station construction windows could oscillate when resizing the window moved the mouse into the window.
Diffstat (limited to 'src/airport_gui.cpp')
-rw-r--r-- | src/airport_gui.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 597e3291e..45af2f785 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -391,8 +391,10 @@ public: top = DrawStationCoverageAreaText(panel_nwi->pos_x + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, SCT_ALL, rad, true) + WD_PAR_VSEP_NORMAL; } - /* Resize background if the text is not equally long as the window. */ - if (top > bottom || (top < bottom && panel_nwi->current_y > panel_nwi->smallest_y)) { + /* Resize background if the window is too small. + * Never make the window smaller to avoid oscillating if the size change affects the acceptance. + * (This is the case, if making the window bigger moves the mouse into the window.) */ + if (top > bottom) { ResizeWindow(this, 0, top - bottom); } } |