Fix unnecessary preview refresh when adding a widget