Skip to content

Commit

Permalink
Fix an issue with progress accepting for PySide6
Browse files Browse the repository at this point in the history
I don't know why this is an issue, but these changes appear to fix it.

Signed-off-by: Patrick Avery <[email protected]>
  • Loading branch information
psavery committed Oct 13, 2023
1 parent 181e4a0 commit dac71e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hexrd/ui/indexing/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def __init__(self, parent=None):

def setup_connections(self):
self.progress_text.connect(self.progress_dialog.setLabelText)
self.accept_progress_signal.connect(self.progress_dialog.accept)
self.accept_progress_signal.connect(self.progress_dialog.accept,
Qt.QueuedConnection)

def update_progress_text(self, text):
self.progress_text.emit(text)
Expand Down Expand Up @@ -387,6 +388,8 @@ def generate_grains_table(self):
self.grains_table)

def confirm_indexing_results(self):
# FIXME: why is accepting the progress necessary here?
self.accept_progress()
if self.grains_table is None:
msg = 'No grains found'
QMessageBox.critical(self.parent, msg, msg)
Expand Down

0 comments on commit dac71e3

Please sign in to comment.