Skip to content

Commit

Permalink
Fix broken merge
Browse files Browse the repository at this point in the history
  • Loading branch information
KochTobi committed Aug 28, 2024
1 parent 2ab2545 commit 2e7a8d1
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@
import life.qbic.datamanager.parser.ParsingResult;
import life.qbic.datamanager.parser.tsv.TSVParser;
import life.qbic.datamanager.parser.xlsx.XLSXParser;
import life.qbic.datamanager.views.CancelConfirmationNotificationDialog;
import java.util.stream.IntStream;
import life.qbic.application.commons.Result;
import life.qbic.datamanager.views.general.InfoBox;
import life.qbic.datamanager.views.general.WizardDialogWindow;
import life.qbic.datamanager.views.notifications.ErrorMessage;
import life.qbic.datamanager.views.notifications.NotificationDialog;
import life.qbic.datamanager.views.notifications.StyledNotification;
import life.qbic.datamanager.views.projects.EditableMultiFileMemoryBuffer;
import life.qbic.projectmanagement.application.measurement.MeasurementMetadata;
Expand Down Expand Up @@ -85,7 +83,6 @@ public MeasurementMetadataUploadDialog(MeasurementValidationService measurementV
"measurementValidationExecutor must not be null");
this.mode = requireNonNull(mode,
"The dialog mode needs to be defined");
specifyCancelShortcuts(this::onCanceled);

this.uploadBuffer = new EditableMultiFileMemoryBuffer();
this.measurementMetadataUploads = new ArrayList<>();
Expand Down Expand Up @@ -335,17 +332,22 @@ private void showErrorNotification(String title, String description) {
}

private void onCanceled() {
CancelConfirmationNotificationDialog cancelDialog = new CancelConfirmationNotificationDialog()
.withBodyText("Uploaded information has not yet been saved.")
.withConfirmText("Discard upload")
.withTitle("Discard uploaded information?");
cancelDialog.open();
cancelDialog.addConfirmListener(event -> {
cancelDialog.close();

NotificationDialog dialog = NotificationDialog.warningDialog()
.withTitle("Discard uploaded information?")
.withContent(new Span("Uploaded information has not yet been saved."));
dialog.setCancelable(true);
dialog.setCancelText("Continue Editing");
Button redButton = new Button("Discard upload");
redButton.addClassName("danger");
dialog.setConfirmButton(redButton);
dialog.addConfirmListener(event -> {
event.getSource().close();
fireEvent(new CancelEvent(this, true));
});
cancelDialog.addCancelListener(
event -> cancelDialog.close());
dialog.addCancelListener(event -> event.getSource().close());
dialog.open();

}

@Override
Expand Down

0 comments on commit 2e7a8d1

Please sign in to comment.