Skip to content
Snippets Groups Projects
Commit 87a93243 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Reload content player on screen settings change

parent 3c1852b4
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,7 @@ import java.net.URI ...@@ -22,6 +22,7 @@ import java.net.URI
class ContentPlayerSettingsViewController extends ProfileSettingsTabViewController with IProfileReloadTask { class ContentPlayerSettingsViewController extends ProfileSettingsTabViewController with IProfileReloadTask {
private var startZoneHash: Int = _ private var startZoneHash: Int = _
private var startScreenHash: Int = _
@FXML var ffmpegButton: Button = _ @FXML var ffmpegButton: Button = _
@FXML var ffmpegTextField: TextField = _ @FXML var ffmpegTextField: TextField = _
...@@ -155,7 +156,8 @@ class ContentPlayerSettingsViewController extends ProfileSettingsTabViewControll ...@@ -155,7 +156,8 @@ class ContentPlayerSettingsViewController extends ProfileSettingsTabViewControll
override def loadSettings(settings: Profile): Unit = { override def loadSettings(settings: Profile): Unit = {
val configuration = ContentPlayerSettingsViewController.getZoneConfiguration val configuration = ContentPlayerSettingsViewController.getZoneConfiguration
startZoneHash = configuration.zones.hashCode() startZoneHash = configuration.zones.hashCode
startScreenHash = configuration.screen.hashCode
listView.getItems.setAll(configuration.zones) listView.getItems.setAll(configuration.zones)
...@@ -185,7 +187,8 @@ class ContentPlayerSettingsViewController extends ProfileSettingsTabViewControll ...@@ -185,7 +187,8 @@ class ContentPlayerSettingsViewController extends ProfileSettingsTabViewControll
configuration.ffprobeExecutable = ffprobeTextField.getText 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 !listView.getSelectionModel.isEmpty
override def validSettings(): Boolean = { override def validSettings(): Boolean = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment