Skip to content

Commit 5cfddb4

Browse files
committed
Raise error in dialog if drag-and-drop fails
Signed-off-by: Brianna Major <brianna.major@kitware.com>
1 parent edfa609 commit 5cfddb4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hexrdgui/main_window.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,4 +1779,8 @@ def dropEvent(self, paths):
17791779
# extension is not in known list
17801780
self.open_image_files(selected_files=paths)
17811781
except Exception as e:
1782-
print(f'Error loading images: {e}')
1782+
error_message = (
1783+
'Unable to guess file type (state, instrument, materials, or '
1784+
'image). Please use File menu to load.'
1785+
)
1786+
QMessageBox.critical(self, 'Error', error_message)

0 commit comments

Comments
 (0)