clear selection on pushState, fixes #12

This commit is contained in:
Ondřej Žára 2020-05-04 20:39:06 +02:00
parent ef772b77ff
commit 195d88f452
2 changed files with 6 additions and 2 deletions

View file

@ -1644,8 +1644,8 @@ class Library extends Component {
_popState() {
this.selection.clear();
this._stateStack.pop();
if (this._stateStack.length > 0) {
let state = this._stateStack[this._stateStack.length-1];
this._showState(state);
@ -1682,7 +1682,9 @@ class Library extends Component {
}
_pushState(state) {
this.selection.clear();
this._stateStack.push(state);
this._showState(state);
}

View file

@ -48,8 +48,8 @@ class Library extends Component {
_popState() {
this.selection.clear();
this._stateStack.pop();
if (this._stateStack.length > 0) {
let state = this._stateStack[this._stateStack.length-1];
this._showState(state);
@ -86,7 +86,9 @@ class Library extends Component {
}
_pushState(state) {
this.selection.clear();
this._stateStack.push(state);
this._showState(state);
}