mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Merge pull request #3947 from godric3/map-editor-fix-prison-hero-selection
map editor: fix prison hero selection
This commit is contained in:
commit
9921065088
@ -317,7 +317,7 @@ void Inspector::updateProperties(CGHeroInstance * o)
|
||||
addProperty("Skills", PropertyEditorPlaceholder(), delegate, false);
|
||||
addProperty("Spells", PropertyEditorPlaceholder(), new HeroSpellDelegate(*o), false);
|
||||
|
||||
if(o->type)
|
||||
if(o->type || o->ID == Obj::PRISON)
|
||||
{ //Hero type
|
||||
auto * delegate = new InspectorDelegate;
|
||||
for(int i = 0; i < VLC->heroh->objects.size(); ++i)
|
||||
@ -330,7 +330,7 @@ void Inspector::updateProperties(CGHeroInstance * o)
|
||||
}
|
||||
}
|
||||
}
|
||||
addProperty("Hero type", o->type->getNameTranslated(), delegate, false);
|
||||
addProperty("Hero type", o->type ? o->type->getNameTranslated() : "", delegate, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user