forked from MapComplete/MapComplete
		
	UX: add hotkey to open new point dialog
This commit is contained in:
		
							parent
							
								
									0e43ac0a7a
								
							
						
					
					
						commit
						0bb55e82ab
					
				
					 1 changed files with 12 additions and 0 deletions
				
			
		|  | @ -7,6 +7,8 @@ import LayerState from "../../Logic/State/LayerState" | ||||||
| import { Store } from "../../Logic/UIEventSource" | import { Store } from "../../Logic/UIEventSource" | ||||||
| import { FeatureSource, IndexedFeatureSource } from "../../Logic/FeatureSource/FeatureSource" | import { FeatureSource, IndexedFeatureSource } from "../../Logic/FeatureSource/FeatureSource" | ||||||
| import { Tag } from "../../Logic/Tags/Tag" | import { Tag } from "../../Logic/Tags/Tag" | ||||||
|  | import Hotkeys from "../../UI/Base/Hotkeys" | ||||||
|  | import Translations from "../../UI/i18n/Translations" | ||||||
| 
 | 
 | ||||||
| export class WithLayoutSourceState extends WithSelectedElementState { | export class WithLayoutSourceState extends WithSelectedElementState { | ||||||
|     readonly layerState: LayerState |     readonly layerState: LayerState | ||||||
|  | @ -50,6 +52,15 @@ export class WithLayoutSourceState extends WithSelectedElementState { | ||||||
|         this.floors = WithLayoutSourceState.initFloors(this.featuresInView) |         this.floors = WithLayoutSourceState.initFloors(this.featuresInView) | ||||||
| 
 | 
 | ||||||
|         this.initFilters() |         this.initFilters() | ||||||
|  | 
 | ||||||
|  |         Hotkeys.RegisterHotkey( | ||||||
|  |             { nomod: "n" }, | ||||||
|  |             Translations.t.hotkeyDocumentation.addNew, | ||||||
|  |             () => { | ||||||
|  |                 this.openNewDialog() | ||||||
|  |             } | ||||||
|  |         ) | ||||||
|  | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|  | @ -121,4 +132,5 @@ export class WithLayoutSourceState extends WithSelectedElementState { | ||||||
|         this.featureProperties.trackFeature(feature) |         this.featureProperties.trackFeature(feature) | ||||||
|         this.selectedElement.setData(feature) |         this.selectedElement.setData(feature) | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue