[-] Fixed bug with IsNotSelectable units and InfoPanel

This commit is contained in:
cybermind 2015-02-13 19:54:34 +05:00
parent 65487e9e2a
commit 0b50a9d88a

View file

@ -1182,10 +1182,14 @@ static void InfoPanel_draw_multiple_selection()
*/
void CInfoPanel::Draw()
{
switch (Selected.size()) {
case 0: { InfoPanel_draw_no_selection(); break; }
case 1: { InfoPanel_draw_single_selection(NULL); break; }
default: { InfoPanel_draw_multiple_selection(); break; }
if (UnitUnderCursor && Selected.empty() && !UnitUnderCursor->Type->IsNotSelectable) {
InfoPanel_draw_single_selection(UnitUnderCursor);
} else {
switch (Selected.size()) {
case 0: { InfoPanel_draw_no_selection(); break; }
case 1: { InfoPanel_draw_single_selection(NULL); break; }
default: { InfoPanel_draw_multiple_selection(); break; }
}
}
}