bring opened file window to foreground

This commit is contained in:
Craig Raw 2021-05-11 12:58:11 +02:00
parent cbf32a36c6
commit 6f35d86890

View file

@ -1803,6 +1803,10 @@ public class AppController implements Initializable {
@Subscribe @Subscribe
public void requestWalletOpen(RequestWalletOpenEvent event) { public void requestWalletOpen(RequestWalletOpenEvent event) {
if(tabs.getScene().getWindow().equals(event.getWindow())) { if(tabs.getScene().getWindow().equals(event.getWindow())) {
if(event.getWindow() instanceof Stage) {
((Stage)event.getWindow()).toFront();
}
if(event.getFile() != null) { if(event.getFile() != null) {
openWalletFile(event.getFile(), true); openWalletFile(event.getFile(), true);
} else { } else {
@ -1814,6 +1818,10 @@ public class AppController implements Initializable {
@Subscribe @Subscribe
public void requestTransactionOpen(RequestTransactionOpenEvent event) { public void requestTransactionOpen(RequestTransactionOpenEvent event) {
if(tabs.getScene().getWindow().equals(event.getWindow())) { if(tabs.getScene().getWindow().equals(event.getWindow())) {
if(event.getWindow() instanceof Stage) {
((Stage)event.getWindow()).toFront();
}
if(event.getFile() != null) { if(event.getFile() != null) {
openTransactionFile(event.getFile()); openTransactionFile(event.getFile());
} else { } else {