Reset the add point dialog when the popup is closed

This commit is contained in:
Pieter Vander Vennet 2021-04-08 22:32:15 +02:00
parent 39711373cd
commit 8e15f8488a
3 changed files with 29 additions and 8 deletions

View file

@ -428,11 +428,12 @@ export class InitUiElements {
}
const newPointDialogIsShown = new UIEventSource<boolean>(false);
const addNewPoint = new ScrollableFullScreen(
() => Translations.t.general.add.title.Clone(),
() => new SimpleAddUI(),
"new");
() => new SimpleAddUI(newPointDialogIsShown),
"new",
newPointDialogIsShown)
addNewPoint.isShown.addCallback(isShown => {
if (!isShown) {
State.state.LastClickLocation.setData(undefined)