EditDialog: Don't update the DB when no changes were made

Even when clicking the OK button don't write to the database when no
changes were made.