File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -3050,17 +3050,19 @@ class MergeSegmentsTool extends LayerTool<SegmentationUserLayer> {
30503050 ) ;
30513051 // Switch selected layer to the layer associated with the tool
30523052 // to enable to place line tool. Swap back when deactivating.
3053- const { selectedLayer } = this . layer . manager . root ;
3053+ const { selectedLayer, selectionState } = this . layer . manager . root ;
30543054 const previousSelectedLayer = selectedLayer . layer ;
30553055 const previousSelectedLayerVisible = selectedLayer . visible ;
30563056 const previousTool = tool . value ;
30573057 selectedLayer . layer = this . layer . managedLayer ;
30583058 selectedLayer . visible = true ;
30593059 tool . value = lineTool ;
3060+ const prevousSelectionState = selectionState . toJSON ( ) ;
30603061 activation . registerDisposer ( ( ) => {
30613062 selectedLayer . layer = previousSelectedLayer ;
30623063 selectedLayer . visible = previousSelectedLayerVisible ;
30633064 tool . value = previousTool ;
3065+ selectionState . restoreState ( prevousSelectionState ) ;
30643066 } ) ;
30653067 const { merges, autoSubmit } = mergeState ;
30663068 const { body, header } =
You can’t perform that action at this time.
0 commit comments