From 87a93243ec81246b82df904f4c5af2f284b84f1a Mon Sep 17 00:00:00 2001 From: tobias <thinkdifferent055@gmail.com> Date: Wed, 15 Dec 2021 10:05:27 +0100 Subject: [PATCH] Reload content player on screen settings change --- .../settings/ContentPlayerSettingsViewController.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/scala/de/tobias/playpad/plugin/content/settings/ContentPlayerSettingsViewController.scala b/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/scala/de/tobias/playpad/plugin/content/settings/ContentPlayerSettingsViewController.scala index b5995d41..232afcb4 100644 --- a/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/scala/de/tobias/playpad/plugin/content/settings/ContentPlayerSettingsViewController.scala +++ b/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/scala/de/tobias/playpad/plugin/content/settings/ContentPlayerSettingsViewController.scala @@ -22,6 +22,7 @@ import java.net.URI class ContentPlayerSettingsViewController extends ProfileSettingsTabViewController with IProfileReloadTask { private var startZoneHash: Int = _ + private var startScreenHash: Int = _ @FXML var ffmpegButton: Button = _ @FXML var ffmpegTextField: TextField = _ @@ -155,7 +156,8 @@ class ContentPlayerSettingsViewController extends ProfileSettingsTabViewControll override def loadSettings(settings: Profile): Unit = { val configuration = ContentPlayerSettingsViewController.getZoneConfiguration - startZoneHash = configuration.zones.hashCode() + startZoneHash = configuration.zones.hashCode + startScreenHash = configuration.screen.hashCode listView.getItems.setAll(configuration.zones) @@ -185,7 +187,8 @@ class ContentPlayerSettingsViewController extends ProfileSettingsTabViewControll configuration.ffprobeExecutable = ffprobeTextField.getText } - override def needReload(): Boolean = startZoneHash != ContentPlayerSettingsViewController.getZoneConfiguration.zones.hashCode() || + override def needReload(): Boolean = startZoneHash != ContentPlayerSettingsViewController.getZoneConfiguration.zones.hashCode || + startScreenHash != ContentPlayerSettingsViewController.getZoneConfiguration.screen.hashCode || !listView.getSelectionModel.isEmpty override def validSettings(): Boolean = { -- GitLab