[DE] Fix selection for multilevel list

This commit is contained in:
Julia Radzhabova 2019-12-17 13:15:51 +03:00
parent e946e06dc3
commit d207cab626
2 changed files with 13 additions and 2 deletions

View file

@ -493,7 +493,11 @@ define([
switch(this._state.bullets.type) { switch(this._state.bullets.type) {
case 0: case 0:
this.toolbar.btnMarkers.toggle(true, true); this.toolbar.btnMarkers.toggle(true, true);
if (this._state.bullets.subtype!==undefined)
this.toolbar.mnuMarkersPicker.selectByIndex(this._state.bullets.subtype, true); this.toolbar.mnuMarkersPicker.selectByIndex(this._state.bullets.subtype, true);
else
this.toolbar.mnuMarkersPicker.deselectAll(true);
this.toolbar.mnuMultilevelPicker.deselectAll(true);
break; break;
case 1: case 1:
var idx = 0; var idx = 0;
@ -521,7 +525,11 @@ define([
break; break;
} }
this.toolbar.btnNumbers.toggle(true, true); this.toolbar.btnNumbers.toggle(true, true);
if (this._state.bullets.subtype!==undefined)
this.toolbar.mnuNumbersPicker.selectByIndex(idx, true); this.toolbar.mnuNumbersPicker.selectByIndex(idx, true);
else
this.toolbar.mnuNumbersPicker.deselectAll(true);
this.toolbar.mnuMultilevelPicker.deselectAll(true);
break; break;
case 2: case 2:
this.toolbar.btnMultilevels.toggle(true, true); this.toolbar.btnMultilevels.toggle(true, true);

View file

@ -422,6 +422,9 @@ define([
conf: {index: 0}, conf: {index: 0},
selectByIndex: function (idx) { selectByIndex: function (idx) {
this.conf.index = idx; this.conf.index = idx;
},
deselectAll: function () {
this.conf.index = -1;
} }
}; };
this.mnuNumbersPicker = clone(this.mnuMarkersPicker); this.mnuNumbersPicker = clone(this.mnuMarkersPicker);