editor: reload events table when the unite threshold changes #898

This commit is contained in:
Alex Andres 2024-06-21 08:28:14 +02:00
parent 20773b5165
commit e4d2ad05ac
No known key found for this signature in database
GPG key ID: 340764C7851D7041

View file

@ -79,6 +79,11 @@ public class PageEventsPresenter extends Presenter<PageEventsView> {
@Override
public void initialize() {
EditorConfiguration config = (EditorConfiguration) context.getConfiguration();
config.actionsUniteThresholdProperty().addListener((o, oldValue, newValue) -> {
CompletableFuture.runAsync(this::loadSelectedPageEvents);
});
pageEventProperty = new ObjectProperty<>();
view.bindSelectedPageEvent(pageEventProperty);
@ -136,7 +141,7 @@ public class PageEventsPresenter extends Presenter<PageEventsView> {
/**
* Moves the current timestamp to right before the PlaybackAction
*
* @param event the PlaybackAction, which timestamp should be selected
* @param event the PlaybackAction which timestamp should be selected
*/
private void selectPageEvent(PageEvent event) {
if (Objects.isNull(event)) {
@ -198,7 +203,7 @@ public class PageEventsPresenter extends Presenter<PageEventsView> {
continue;
}
// Do not show the action in the list, if it has the same handle
// Do not show the action in the list if it has the same handle
// as the previous action.
if (isNull(previousAction)
|| !action.getClass().equals(previousAction.getClass())