bring window to front one external file load

This commit is contained in:
Craig Raw 2021-05-12 09:02:39 +02:00
parent 6155306acc
commit d559b437b3
3 changed files with 9 additions and 9 deletions

View file

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

View file

@ -653,6 +653,11 @@ public class AppServices {
openWindow = getActiveWindow();
}
if(openWindow instanceof Stage) {
((Stage)openWindow).setAlwaysOnTop(true);
((Stage)openWindow).setAlwaysOnTop(false);
}
for(File file : openFiles) {
if(isWalletFile(file)) {
EventManager.get().post(new RequestWalletOpenEvent(openWindow, file));

View file

@ -160,7 +160,10 @@ public class TransactionsController extends WalletFormController implements Init
logMessage = logMessage.replace("m/", "/");
String date = LOG_DATE_FORMAT.format(new Date());
String logLine = "\n" + date + " " + logMessage;
Platform.runLater(() -> loadingLog.appendText(logLine));
Platform.runLater(() -> {
loadingLog.appendText(logLine);
loadingLog.setScrollLeft(0);
});
}
}