edvin / tornadofx2

TornadoFX 2.0
Apache License 2.0
156 stars 41 forks source link

fix workspace docking bug #14

Closed SKeeneCode closed 3 years ago

SKeeneCode commented 3 years ago

fixes #13

When a workspace switches from Stack Mode to Tab Mode, it will rely on the components rootParentChangeListener to undock and redock the dockedComponent in its new location (TabPane in this case). This callOnDock in the listener is not done inDynamicComponentMode, meaning any workspace buttons added in the components onDock function would not be marked for removal upon an onUndock call.

This fix briefly removes the listener of the component for its workspace dock call in this single instance. Line 296 ensures the component will be docked inDynamicComponentMode as expected.