[update] add selection for merge strategy for loading of single event files

This commit is contained in:
Marcel Paffrath 2024-08-12 16:03:29 +02:00
parent 213819c702
commit 5d6f4619cc

View File

@ -1032,6 +1032,21 @@ class MainWindow(QMainWindow):
fname = self.filename_from_action(action)
if not fname:
return
qmb = QMessageBox(self, icon=QMessageBox.Question,
text='Do you want to overwrite this data?',)
overwrite_button = qmb.addButton('Overwrite', QMessageBox.YesRole)
merge_button = qmb.addButton('Merge', QMessageBox.NoRole)
qmb.exec_()
if qmb.clickedButton() == overwrite_button:
merge_strategy = 'Overwrite'
elif qmb.clickedButton() == merge_button:
merge_strategy = 'Merge'
else:
return
if not event:
event = self.get_current_event()
data = Data(self, event)