UX: add hotkey to open new point dialog

This commit is contained in:
Pieter Vander Vennet 2025-04-29 22:47:12 +02:00
parent 0e43ac0a7a
commit 0bb55e82ab

View file

@ -7,6 +7,8 @@ import LayerState from "../../Logic/State/LayerState"
import { Store } from "../../Logic/UIEventSource"
import { FeatureSource, IndexedFeatureSource } from "../../Logic/FeatureSource/FeatureSource"
import { Tag } from "../../Logic/Tags/Tag"
import Hotkeys from "../../UI/Base/Hotkeys"
import Translations from "../../UI/i18n/Translations"
export class WithLayoutSourceState extends WithSelectedElementState {
readonly layerState: LayerState
@ -50,6 +52,15 @@ export class WithLayoutSourceState extends WithSelectedElementState {
this.floors = WithLayoutSourceState.initFloors(this.featuresInView)
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.selectedElement.setData(feature)
}
}