diff --git a/src/calibre/gui2/dialogs/user_profiles.py b/src/calibre/gui2/dialogs/user_profiles.py index 5cae63c6d7..a06191e48c 100644 --- a/src/calibre/gui2/dialogs/user_profiles.py +++ b/src/calibre/gui2/dialogs/user_profiles.py @@ -84,6 +84,7 @@ class UserProfiles(QDialog, Ui_Dialog): self.populate_options(recipe) self.stacks.setCurrentIndex(0) self.toggle_mode_button.setText(_('Switch to Advanced mode')) + self.source_code.setPlainText('') else: self.source_code.setPlainText(src) self.highlighter = PythonHighlighter(self.source_code.document())