Log infobox removal only if infobox was removed

Debug log infobox removal from infobox manager only if infobox was
really removed.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2019-02-17 21:57:50 +01:00
parent 6004ac48bb
commit a26197e91e

View File

@@ -76,18 +76,18 @@ public class InfoBoxManager
public void removeInfoBox(InfoBox infoBox)
{
log.debug("Removing InfoBox {}", infoBox);
if (infoBoxes.remove(infoBox))
{
log.debug("Removed InfoBox {}", infoBox);
refreshInfoBoxes();
}
}
public void removeIf(Predicate<InfoBox> filter)
{
log.debug("Removing InfoBoxes for filter {}", filter);
if (infoBoxes.removeIf(filter))
{
log.debug("Removed InfoBoxes for filter {}", filter);
refreshInfoBoxes();
}
}