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;
}
int currentIndex;
// 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
lstContentListView.scrollTo(currentIndex -2);
@ -146,7 +150,11 @@ public class Controller_Frontend {
lstContentListView.getSelectionModel().clearSelection();
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>() {
@Override
protected void updateItem(String item, boolean empty) {
@ -165,14 +173,16 @@ public class Controller_Frontend {
Commands.decode(prog[DataRegister.getPC()]);
DataRegister.increasePC();
}
else
else {
Commands.decode(0);
}
WatchdogTimer.testAndTrigger();
Table.refresh();
Stage stage = (Stage) stepintoButton.getScene().getWindow();
CreateWindow.refreshTable(stage);
IOPorts.refreshUI(getTRISbuttons(), getPORTbuttons());
totalExecutionTimeLabel.setText("Total Execution Time: " + Commands.getTotalExecutionTime() + " µs");
totalExecutionTimeLabel.setText("Total Execution Time: " + Commands.getTotalExecutionTime() + "µs");
}