improved showLegend behaviour during gadget upgrades