Change dialog modality and only center dialog when it is created
This commit is contained in:
parent
edb087abde
commit
97a24d8d52
@ -186,7 +186,7 @@ class FileSelectionList(QtWidgets.QWidget):
|
||||
# Prog dialog on Linux flakes out for small range, so scale up
|
||||
progdialog = QtWidgets.QProgressDialog("", "Cancel", 0, len(filelist), parent=self)
|
||||
progdialog.setWindowTitle("Adding Files")
|
||||
progdialog.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
|
||||
progdialog.setWindowModality(QtCore.Qt.WindowModality.WindowModal)
|
||||
progdialog.setMinimumDuration(300)
|
||||
center_window_on_parent(progdialog)
|
||||
|
||||
@ -200,7 +200,6 @@ class FileSelectionList(QtWidgets.QWidget):
|
||||
break
|
||||
progdialog.setValue(idx + 1)
|
||||
progdialog.setLabelText(f)
|
||||
center_window_on_parent(progdialog)
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
row = self.add_path_item(f)
|
||||
if row is not None:
|
||||
|
@ -185,7 +185,6 @@ class RenameWindow(QtWidgets.QDialog):
|
||||
|
||||
prog_dialog.setValue(idx)
|
||||
prog_dialog.setLabelText(comic[1])
|
||||
center_window_on_parent(prog_dialog)
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
|
||||
folder = get_rename_dir(
|
||||
|
@ -507,7 +507,7 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
|
||||
prog_dialog = QtWidgets.QProgressDialog("", "Cancel", 0, non_zip_count, self)
|
||||
prog_dialog.setWindowTitle("Exporting as ZIP")
|
||||
prog_dialog.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
|
||||
prog_dialog.setWindowModality(QtCore.Qt.WindowModality.WindowModal)
|
||||
prog_dialog.setMinimumDuration(300)
|
||||
center_window_on_parent(prog_dialog)
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
@ -524,7 +524,6 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
break
|
||||
prog_dialog.setValue(prog_idx)
|
||||
prog_dialog.setLabelText(str(ca.path))
|
||||
center_window_on_parent(prog_dialog)
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
|
||||
export_name = ca.path.with_suffix(".cbz")
|
||||
@ -1550,7 +1549,7 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
if reply == QtWidgets.QMessageBox.StandardButton.Yes:
|
||||
progdialog = QtWidgets.QProgressDialog("", "Cancel", 0, has_md_count, self)
|
||||
progdialog.setWindowTitle("Removing Tags")
|
||||
progdialog.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
|
||||
progdialog.setWindowModality(QtCore.Qt.WindowModality.WindowModal)
|
||||
progdialog.setMinimumDuration(300)
|
||||
center_window_on_parent(progdialog)
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
@ -1563,7 +1562,6 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
break
|
||||
progdialog.setValue(prog_idx)
|
||||
progdialog.setLabelText(str(ca.path))
|
||||
center_window_on_parent(progdialog)
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
if ca.has_metadata(style):
|
||||
if ca.is_writable():
|
||||
@ -1629,7 +1627,7 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
if reply == QtWidgets.QMessageBox.StandardButton.Yes:
|
||||
prog_dialog = QtWidgets.QProgressDialog("", "Cancel", 0, has_src_count, self)
|
||||
prog_dialog.setWindowTitle("Copying Tags")
|
||||
prog_dialog.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
|
||||
prog_dialog.setWindowModality(QtCore.Qt.WindowModality.WindowModal)
|
||||
prog_dialog.setMinimumDuration(300)
|
||||
center_window_on_parent(prog_dialog)
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
@ -1643,7 +1641,6 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
|
||||
prog_dialog.setValue(prog_idx)
|
||||
prog_dialog.setLabelText(str(ca.path))
|
||||
center_window_on_parent(prog_dialog)
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
|
||||
if ca.has_metadata(src_style) and ca.is_writable():
|
||||
@ -1855,6 +1852,7 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
self.atprogdialog.show()
|
||||
self.atprogdialog.progressBar.setMaximum(len(ca_list))
|
||||
self.atprogdialog.setWindowTitle("Auto-Tagging")
|
||||
center_window_on_parent(self.atprogdialog)
|
||||
|
||||
self.auto_tag_log("==========================================================================\n")
|
||||
self.auto_tag_log(f"Auto-Tagging Started for {len(ca_list)} items\n")
|
||||
@ -1880,7 +1878,6 @@ class TaggerWindow(QtWidgets.QMainWindow):
|
||||
self.atprogdialog.progressBar.setValue(prog_idx)
|
||||
|
||||
self.atprogdialog.label.setText(str(ca.path))
|
||||
center_window_on_parent(self.atprogdialog)
|
||||
QtCore.QCoreApplication.processEvents()
|
||||
|
||||
if ca.is_writable():
|
||||
|
Loading…
Reference in New Issue
Block a user