mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-30 19:56:00 +00:00
Allowing only one io-stats window per vault to be open at the same time.
This commit is contained in:
+7
-1
@@ -1,5 +1,6 @@
|
||||
package org.cryptomator.ui.mainwindow;
|
||||
|
||||
import javafx.beans.property.BooleanProperty;
|
||||
import javafx.beans.property.ObjectProperty;
|
||||
import javafx.beans.property.ReadOnlyObjectProperty;
|
||||
import javafx.fxml.FXML;
|
||||
@@ -37,7 +38,12 @@ public class VaultDetailUnlockedController implements FxController {
|
||||
|
||||
@FXML
|
||||
public void showVaultStatistics() {
|
||||
vaultStatisticsWindow.vault(vault.get()).build().showVaultStatisticsWindow();
|
||||
//vaultStatisticsWindow.build()
|
||||
BooleanProperty showingStats = vault.get().showingStatsProperty();
|
||||
if (!showingStats.get()) {
|
||||
vaultStatisticsWindow.vault(vault.get()).build().showVaultStatisticsWindow();
|
||||
showingStats.setValue(true);
|
||||
}
|
||||
}
|
||||
|
||||
/* Getter/Setter */
|
||||
|
||||
@@ -53,6 +53,7 @@ abstract class VaultStatisticsModule {
|
||||
}
|
||||
}
|
||||
});
|
||||
stage.setOnCloseRequest(windowEvent -> vault.showingStatsProperty().setValue(false));
|
||||
return stage;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user