mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-05 05:46:44 +00:00
bring window to front one external file load
This commit is contained in:
parent
6155306acc
commit
d559b437b3
3 changed files with 9 additions and 9 deletions
|
@ -1803,10 +1803,6 @@ 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 {
|
||||||
|
@ -1818,10 +1814,6 @@ 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 {
|
||||||
|
|
|
@ -653,6 +653,11 @@ public class AppServices {
|
||||||
openWindow = getActiveWindow();
|
openWindow = getActiveWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(openWindow instanceof Stage) {
|
||||||
|
((Stage)openWindow).setAlwaysOnTop(true);
|
||||||
|
((Stage)openWindow).setAlwaysOnTop(false);
|
||||||
|
}
|
||||||
|
|
||||||
for(File file : openFiles) {
|
for(File file : openFiles) {
|
||||||
if(isWalletFile(file)) {
|
if(isWalletFile(file)) {
|
||||||
EventManager.get().post(new RequestWalletOpenEvent(openWindow, file));
|
EventManager.get().post(new RequestWalletOpenEvent(openWindow, file));
|
||||||
|
|
|
@ -160,7 +160,10 @@ public class TransactionsController extends WalletFormController implements Init
|
||||||
logMessage = logMessage.replace("m/", "/");
|
logMessage = logMessage.replace("m/", "/");
|
||||||
String date = LOG_DATE_FORMAT.format(new Date());
|
String date = LOG_DATE_FORMAT.format(new Date());
|
||||||
String logLine = "\n" + date + " " + logMessage;
|
String logLine = "\n" + date + " " + logMessage;
|
||||||
Platform.runLater(() -> loadingLog.appendText(logLine));
|
Platform.runLater(() -> {
|
||||||
|
loadingLog.appendText(logLine);
|
||||||
|
loadingLog.setScrollLeft(0);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue