Why multiple LayerTreeStore objects?

Hi all,

I was investigating issue #1996 and #2356 of lack of synchronization between different layer trees.

I’m wondering, why there are different LayerTreeStores for each LayerTree in the first place? I was thinking of fixing this issue by using only one LayerTreeStore of the main parent canvasview, and each LayerTree will change its root to its specific child canvasview. This will eliminate the need of synchronizing “LayerTreeStores” with each other.
Is this reasonable?

AFAIK, there is only one LayerTree for each open document, and only LayerTreeStored to each LayerTree.

The exported canvas has its own LayerTree and LayerTreeStore. I was thinking that since the exported canvas is part of a bigger canvas that has its own LayerTreeStore and LayerTree, we can just use the model of this bigger LayerTree and filter it for our needs using TreeModelFilter.