@@ -888,6 +888,8 @@ export class WorkbenchObjectTree<T extends NonNullable<any>, TFilterData = void>
888888 private hasDoubleSelection : IContextKey < boolean > ;
889889 private hasMultiSelection : IContextKey < boolean > ;
890890
891+ private _useAltAsMultipleSelectionModifier : boolean ;
892+
891893 constructor (
892894 container : HTMLElement ,
893895 delegate : IListVirtualDelegate < T > ,
@@ -916,6 +918,8 @@ export class WorkbenchObjectTree<T extends NonNullable<any>, TFilterData = void>
916918 this . hasDoubleSelection = WorkbenchListDoubleSelection . bindTo ( this . contextKeyService ) ;
917919 this . hasMultiSelection = WorkbenchListMultiSelection . bindTo ( this . contextKeyService ) ;
918920
921+ this . _useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier ( configurationService ) ;
922+
919923 this . disposables . push (
920924 this . contextKeyService ,
921925 ( listService as ListService ) . register ( this ) ,
@@ -933,10 +937,19 @@ export class WorkbenchObjectTree<T extends NonNullable<any>, TFilterData = void>
933937 const focus = this . getFocus ( ) ;
934938
935939 this . hasSelectionOrFocus . set ( selection . length > 0 || focus . length > 0 ) ;
940+ } ) ,
941+ configurationService . onDidChangeConfiguration ( e => {
942+ if ( e . affectsConfiguration ( multiSelectModifierSettingKey ) ) {
943+ this . _useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier ( configurationService ) ;
944+ }
936945 } )
937946 ) ;
938947 }
939948
949+ get useAltAsMultipleSelectionModifier ( ) : boolean {
950+ return this . _useAltAsMultipleSelectionModifier ;
951+ }
952+
940953 dispose ( ) : void {
941954 super . dispose ( ) ;
942955 this . disposables = dispose ( this . disposables ) ;
@@ -951,6 +964,8 @@ export class WorkbenchAsyncDataTree<T extends NonNullable<any>, TFilterData = vo
951964 private hasDoubleSelection : IContextKey < boolean > ;
952965 private hasMultiSelection : IContextKey < boolean > ;
953966
967+ private _useAltAsMultipleSelectionModifier : boolean ;
968+
954969 constructor (
955970 container : HTMLElement ,
956971 delegate : IListVirtualDelegate < T > ,
@@ -980,6 +995,8 @@ export class WorkbenchAsyncDataTree<T extends NonNullable<any>, TFilterData = vo
980995 this . hasDoubleSelection = WorkbenchListDoubleSelection . bindTo ( this . contextKeyService ) ;
981996 this . hasMultiSelection = WorkbenchListMultiSelection . bindTo ( this . contextKeyService ) ;
982997
998+ this . _useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier ( configurationService ) ;
999+
9831000 this . disposables . push (
9841001 this . contextKeyService ,
9851002 ( listService as ListService ) . register ( this ) ,
@@ -997,9 +1014,18 @@ export class WorkbenchAsyncDataTree<T extends NonNullable<any>, TFilterData = vo
9971014 const focus = this . getFocus ( ) ;
9981015
9991016 this . hasSelectionOrFocus . set ( selection . length > 0 || focus . length > 0 ) ;
1017+ } ) ,
1018+ configurationService . onDidChangeConfiguration ( e => {
1019+ if ( e . affectsConfiguration ( multiSelectModifierSettingKey ) ) {
1020+ this . _useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier ( configurationService ) ;
1021+ }
10001022 } )
10011023 ) ;
10021024 }
1025+
1026+ get useAltAsMultipleSelectionModifier ( ) : boolean {
1027+ return this . _useAltAsMultipleSelectionModifier ;
1028+ }
10031029}
10041030
10051031const configurationRegistry = Registry . as < IConfigurationRegistry > ( ConfigurationExtensions . Configuration ) ;
0 commit comments