1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Fix cancelling spellcast with escape

This commit is contained in:
Ivan Savenko
2023-05-08 17:30:02 +03:00
parent 243773b6ef
commit c01b74434c
5 changed files with 14 additions and 26 deletions

View File

@@ -133,7 +133,6 @@ std::shared_ptr<IImage> AdventureMapWidget::loadImage(const std::string & name)
if(images.count(resource.getName()) == 0)
images[resource.getName()] = IImage::createFromFile(resource.getName());
;
return images[resource.getName()];
}
@@ -212,6 +211,7 @@ std::shared_ptr<CIntObject> AdventureMapWidget::buildMapContainer(const JsonNode
addWidget(entry["name"].String(), widget);
result->ownedChildren.push_back(widget);
// FIXME: remove cast and replace it with better check
if (std::dynamic_pointer_cast<CLabel>(widget) || std::dynamic_pointer_cast<CLabelGroup>(widget))
result->addChild(widget.get(), true);
else