Skip to content

Commit

Permalink
Reused modal didn't get stage icons set (#779)
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvin Syse committed Aug 17, 2018
1 parent 95cbf1c commit d718da5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@
- Observable collection delegates removed because they shadow observable properties (See Properties.kt:L212)
- The `style` property of `ListCell` will be cleared by the framework so it can be manipulated in `cellFormat` without side effects (https://stackoverflow.com/questions/51459371/custom-cell-format-listview-tornadofx-on-delete-item)
- Escape closes window only works first time for Views (https://github.com/edvin/tornadofx/issues/764)
- Reused modal didn't get stage icons set (https://github.com/edvin/tornadofx/issues/779)

### Changes

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tornadofx/Component.kt
Expand Up @@ -931,13 +931,14 @@ abstract class UIComponent(viewTitle: String? = "", icon: Node? = null) : Compon
} else {
Scene(getRootWrapper()).apply {
FX.applyStylesheetsTo(this)
val primaryStage = FX.getPrimaryStage(scope)
if (primaryStage != null) icons += primaryStage.icons
scene = this
this@UIComponent.properties["tornadofx.scene"] = this
}
}

val primaryStage = FX.getPrimaryStage(scope)
if (primaryStage != null) icons += primaryStage.icons

hookGlobalShortcuts()

onBeforeShow()
Expand Down

0 comments on commit d718da5

Please sign in to comment.