almost done 1.5.0
This commit is contained in:
@@ -34,6 +34,7 @@ class MultiProgressDialog(QDialog):
|
||||
self.setWindowModality(Qt.WindowModality.NonModal)
|
||||
self.layout = QVBoxLayout(self)
|
||||
self.bars = {}
|
||||
self.allow_closing = False
|
||||
|
||||
def add_participant(self, label, total_steps):
|
||||
clean_key = str(label).strip()
|
||||
@@ -51,6 +52,16 @@ class MultiProgressDialog(QDialog):
|
||||
if label in self.bars:
|
||||
# Force integers to prevent QProgressBar from breaking or flickering
|
||||
self.bars[label].setValue(int(value))
|
||||
|
||||
def closeEvent(self, event):
|
||||
if self.allow_closing:
|
||||
event.accept()
|
||||
else:
|
||||
event.ignore()
|
||||
|
||||
def force_close(self):
|
||||
self.allow_closing = True
|
||||
self.close()
|
||||
|
||||
|
||||
|
||||
@@ -945,7 +956,7 @@ class ParticipantFoldChannelsWidget(FlaresBaseWidget):
|
||||
|
||||
# Close the custom multi-progress window
|
||||
if hasattr(self, 'multi_progress'):
|
||||
self.multi_progress.close()
|
||||
self.multi_progress.force_close()
|
||||
|
||||
# Clean up processes
|
||||
for p in self.active_processes:
|
||||
|
||||
Reference in New Issue
Block a user