Add model notes to recordings table

This commit is contained in:
0xb00bface 2021-09-10 16:01:07 +02:00
parent ed5d674be3
commit e7b688906c
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,7 @@
* Fix LiveJasmin followed tab
* Add buttons to settings to delete cookies per site
* Fix bug in minimal browser
* Added model notes to the recordings table
* Model placeholders can now be used for player params
${modelName}
${modelDisplayName}

View File

@ -59,6 +59,7 @@ import ctbrec.ui.menu.ModelMenuContributor;
import ctbrec.ui.tabs.recorded.ModelName;
import javafx.application.Platform;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.concurrent.ScheduledService;
@ -174,8 +175,12 @@ public class RecordingsTab extends Tab implements TabSelectionListener, Shutdown
notes.setId("notes");
notes.setPrefWidth(400);
notes.setCellValueFactory(cdf -> cdf.getValue().getNoteProperty());
TableColumn<JavaFxRecording, String> modelNotes = new TableColumn<>("Model Notes");
modelNotes.setId("modelNotes");
modelNotes.setPrefWidth(400);
modelNotes.setCellValueFactory(cdf -> new SimpleStringProperty(config.getModelNotes(cdf.getValue().getModel())));
table.getColumns().addAll(name, date, status, progress, size, notes);
table.getColumns().addAll(name, date, status, progress, size, notes, modelNotes);
table.setItems(observableRecordings);
table.addEventHandler(ContextMenuEvent.CONTEXT_MENU_REQUESTED, this::onContextMenuRequested);
table.addEventHandler(MouseEvent.MOUSE_PRESSED, this::onMousePressed);