This commit is contained in:
Sergii Pylypenko
2015-03-10 23:34:53 +02:00
parent 1ae743165d
commit 87981a41e7

View File

@@ -1535,6 +1535,7 @@ static bool IsGoodAutoPlace1(int left, int top, int width, int height, Point &po
int bottom = height + top;
const Window *main_toolbar = FindWindowByClass(WC_MAIN_TOOLBAR);
bool vertical_toolbar = _settings_client.gui.vertical_toolbar && _game_mode != GM_EDITOR;
if (!vertical_toolbar || !main_toolbar) {
if (left < 0 || (main_toolbar != NULL && top < main_toolbar->height) || right > _screen.width || bottom > _screen.height) return false;
} else {