diff --git a/client/src/main/java/ru/trader/controllers/PowerPlayController.java b/client/src/main/java/ru/trader/controllers/PowerPlayController.java
index 32e0c2c..4e1da9a 100644
--- a/client/src/main/java/ru/trader/controllers/PowerPlayController.java
+++ b/client/src/main/java/ru/trader/controllers/PowerPlayController.java
@@ -414,25 +414,37 @@ public class PowerPlayController {
historySystems.getItems().clear();
}
-
- @FXML
- private void copySystemToClipboard(){
- SystemModel starSystem = null;
- if (historySystems.isFocused()) starSystem = historySystems.getSelectionModel().getSelectedItem();
- if (controlSystems.isFocused()) starSystem = controlSystems.getSelectionModel().getSelectedItem();
+ private SystemModel getFocusedSystem(){
+ if (historySystems.isFocused()) return historySystems.getSelectionModel().getSelectedItem();
+ if (controlSystems.isFocused()) return controlSystems.getSelectionModel().getSelectedItem();
if (tblResults.isFocused()){
ResultEntry entry = tblResults.getSelectionModel().getSelectedItem();
- starSystem = entry != null ? entry.starSystem : null;
+ return entry != null ? entry.starSystem : null;
}
if (tblDetail.isFocused()){
ResultEntry entry = tblDetail.getSelectionModel().getSelectedItem();
- starSystem = entry != null ? entry.starSystem : null;
+ return entry != null ? entry.starSystem : null;
}
+ return null;
+ }
+
+ @FXML
+ private void copySystemToClipboard(){
+ SystemModel starSystem = getFocusedSystem();
if (starSystem != null){
Main.copyToClipboard(starSystem.getName());
}
}
+ @FXML
+ private void editSystem(){
+ SystemModel starSystem = getFocusedSystem();
+ if (starSystem != null){
+ Screeners.showSystemsEditor(starSystem);
+ }
+ }
+
+
public class ResultEntry {
private final SystemModel starSystem;
private final ReadOnlyStringProperty nearStations;
diff --git a/client/src/main/resources/view/powerplay.fxml b/client/src/main/resources/view/powerplay.fxml
index 96160ea..deaf1b5 100644
--- a/client/src/main/resources/view/powerplay.fxml
+++ b/client/src/main/resources/view/powerplay.fxml
@@ -14,6 +14,15 @@
prefHeight="500" >
+
+
+
+
+
+
+
+
+
@@ -24,13 +33,7 @@
-
-
-
-
-
-
-
+
@@ -71,13 +74,7 @@
-
-
-
-
-
-
-
+
@@ -150,13 +147,7 @@
-
-
-
-
-
-
-
+
@@ -210,13 +201,7 @@
-
-
-
-
-
-
-
+