This commit is contained in:
2024-05-15 13:08:18 +02:00
parent 2258c5a8be
commit 0b932966c5
3 changed files with 15 additions and 7 deletions

View File

@ -136,8 +136,12 @@ public class Controller_Frontend {
return; return;
} }
int currentIndex;
// Aktuelle Zeile abrufen // Aktuelle Zeile abrufen
int currentIndex = ind[DataRegister.getPC()]; if (!isSleeping)
currentIndex = ind[DataRegister.getPC()];
else
currentIndex = ind[DataRegister.getPC()]-1;
// Scrollen zur ausgewählten Zeile // Scrollen zur ausgewählten Zeile
lstContentListView.scrollTo(currentIndex -2); lstContentListView.scrollTo(currentIndex -2);
@ -146,7 +150,11 @@ public class Controller_Frontend {
lstContentListView.getSelectionModel().clearSelection(); lstContentListView.getSelectionModel().clearSelection();
lstContentListView.getSelectionModel().select(currentIndex); lstContentListView.getSelectionModel().select(currentIndex);
String selectedRowStyle = "-fx-control-inner-background: red;"; String selectedRowStyle;
if (!isSleeping)
selectedRowStyle = "-fx-background-color: red;";
else
selectedRowStyle = "-fx-background-color: teal;";
lstContentListView.setCellFactory(column -> new ListCell<String>() { lstContentListView.setCellFactory(column -> new ListCell<String>() {
@Override @Override
protected void updateItem(String item, boolean empty) { protected void updateItem(String item, boolean empty) {
@ -165,8 +173,10 @@ public class Controller_Frontend {
Commands.decode(prog[DataRegister.getPC()]); Commands.decode(prog[DataRegister.getPC()]);
DataRegister.increasePC(); DataRegister.increasePC();
} }
else else {
Commands.decode(0); Commands.decode(0);
}
WatchdogTimer.testAndTrigger(); WatchdogTimer.testAndTrigger();
Table.refresh(); Table.refresh();
Stage stage = (Stage) stepintoButton.getScene().getWindow(); Stage stage = (Stage) stepintoButton.getScene().getWindow();

View File

@ -46,8 +46,7 @@
</HBox> </HBox>
<VBox layoutX="14.0" layoutY="727.0"> <VBox layoutX="14.0" layoutY="727.0">
<children> <children>
<Label fx:id="totalExecutionTimeLabel" text="Total Execution Time: 0µs" />
<Label fx:id="totalExecutionTimeLabel" text="Total Execution Time: " />
<CheckBox fx:id="wdtCheck" mnemonicParsing="false" onAction="#toggleWatchdog" text="Watchdog-Timer"> <CheckBox fx:id="wdtCheck" mnemonicParsing="false" onAction="#toggleWatchdog" text="Watchdog-Timer">
<VBox.margin> <VBox.margin>
<Insets top="10.0" /> <Insets top="10.0" />

View File

@ -1,4 +1,3 @@
.list-cell:selected { .list-cell:selected {
-fx-background-color: red; -fx-background-color: red;
} }