Fixed crash in minimap legend

This commit is contained in:
pelya
2015-04-13 00:31:52 +03:00
parent 075ac65a93
commit 13ad49d329
2 changed files with 5 additions and 5 deletions

View File

@@ -1717,7 +1717,7 @@ public:
bar->AssignSizePosition(ST_SMALLEST, x, y + display->smallest_y, bar->smallest_x, bar->smallest_y, rtl);
}
uint bar_height = max(bar->smallest_y, this->smallmap_window->GetLegendHeight(this->smallmap_window->GetNumberColumnsLegend(given_width - bar->smallest_x)));
uint bar_height = max(bar->smallest_y, this->smallmap_window->GetLegendHeight(smallmap_window->min_number_of_columns));
uint display_height = given_height - bar_height;
display->AssignSizePosition(ST_RESIZE, x, y, given_width, display_height, rtl);
bar->AssignSizePosition(ST_RESIZE, x, y + display_height, given_width, bar_height, rtl);