Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt the user to reload metadata after using the menu to edit metadata #226

Merged
merged 1 commit into from
Mar 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions neurotic/gui/standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,17 @@ def edit_metadata(self):

try:
open_path_with_default_program(self.metadata_selector.file)

title = 'Reload metadata?'
text = 'The metadata file must be reloaded if you made changes. ' \
'Do you want to reload now?'
button = QT.QMessageBox.question(self, title, text,
defaultButton=QT.QMessageBox.Yes)
if button == QT.QMessageBox.Yes:
self.metadata_selector.load()

except FileNotFoundError as e:

logger.error(f'The metadata file was not found: {e}')
self.statusBar().showMessage('ERROR: The metadata file could not '
'be found', msecs=5000)
Expand Down