Don't ask for confirmation if nothing changed

This commit is contained in:
Adrian Sampson 2015-11-14 14:58:53 -08:00
parent 80facbab6f
commit cfba04bc9d

View file

@ -221,8 +221,12 @@ class EditPlugin(plugins.BeetsPlugin):
"""Save a list of updated Model objects to the database.
"""
# Display and confirm the changes.
changed = False
for obj in objs:
ui.show_model_changes(obj)
changed |= ui.show_model_changes(obj)
if not changed:
ui.print_('No changes to apply.')
return
if not ui.input_yn('Apply changes? (y/n)'):
return