Skip to content

Commit

Permalink
Fix Dialog Close Verhalten (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannMaierhofer authored Sep 10, 2024
1 parent 43827a8 commit 745cc5c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,17 @@ public void handleAction(Object context) throws ApplicationException
}
catch (OperationCanceledException oce)
{
GUI.getStatusBar().setErrorText("Vorgang abgebrochen");
return;
throw oce;
}
catch (Exception e)
{
Logger.error("error while choosing konto", e);
Logger.error("Error while choosing konto", e);
GUI.getStatusBar().setErrorText("Fehler bei der Auswahl des Kontos.");
}
}

if (context == null || !(context instanceof Konto))
throw new ApplicationException("Kein Konto ausgewählt");
return;

final Konto k = (Konto) context;
try
Expand Down
2 changes: 2 additions & 0 deletions src/de/jost_net/JVerein/gui/control/BuchungsControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,8 @@ private void starteAuswertungBuchungsjournal()

// 20220823: sbuer: Statische Variablen fuer neue Sortiermöglichkeiten
String sort = djs.open();
if (djs.getClosed())
return;
query.setOrdername(sort);

FileDialog fd = new FileDialog(GUI.getShell(), SWT.SAVE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ public class BuchungsjournalSortDialog extends AbstractDialog<String>
public final static String DATUM_BLATTNUMMER_ID = "Datum, Blattnummer, Id";
public final static String DATUM_AUSGZUGSNUMMER_BLATTNUMMER_ID = "Datum, Auszugsnummer, Blattnummer, Id";

private String selected = DATUM;
private String selected = DATUM_AUSGZUGSNUMMER_BLATTNUMMER_ID;

private SelectInput sortierung = null;

private boolean closed = true;

public BuchungsjournalSortDialog(int position)
{
Expand All @@ -75,6 +77,7 @@ protected void paint(Composite parent) throws Exception
@Override
public void handleAction(Object context)
{
closed = false;
close();
}
}, null, false, "go-next.png");
Expand Down Expand Up @@ -120,4 +123,9 @@ public void handleEvent(Event event)
});
return this.sortierung;
}

public boolean getClosed()
{
return closed;
}
}

0 comments on commit 745cc5c

Please sign in to comment.