mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
Don't show empty window
This commit is contained in:
@@ -144,7 +144,8 @@ void CRewardableObject::onHeroVisit(const CGHeroInstance *h) const
|
|||||||
iw.text = vi.message;
|
iw.text = vi.message;
|
||||||
vi.reward.loadComponents(iw.components, h);
|
vi.reward.loadComponents(iw.components, h);
|
||||||
iw.type = infoWindowType;
|
iw.type = infoWindowType;
|
||||||
cb->showInfoDialog(&iw);
|
if(!iw.components.empty() || !iw.text.toString().empty())
|
||||||
|
cb->showInfoDialog(&iw);
|
||||||
}
|
}
|
||||||
// grant reward afterwards. Note that it may remove object
|
// grant reward afterwards. Note that it may remove object
|
||||||
grantReward(index, h, markAsVisit);
|
grantReward(index, h, markAsVisit);
|
||||||
|
|||||||
Reference in New Issue
Block a user