[pdf] Fix commit combobox

This commit is contained in:
Nikita Khromov
2026-02-16 19:31:22 +07:00
committed by Ilya Kirillov
parent 08e0f841a6
commit de1d842ba2
3 changed files with 7 additions and 7 deletions

View File

@ -47,7 +47,7 @@
AscPDF.CBaseField.call(this, sName, sType, nPage, aRect, oDoc);
this._commitOnSelChange = false;
this._currentValueIndices = [];
this._currentValueIndexes = [];
this._textFont = AscPDF.DEFAULT_FIELD_FONT;
this._options = [];
}
@ -64,15 +64,15 @@
oParent.SetParentCurIdxs(aIdxs);
else {
AscCommon.History.Add(new CChangesPDFListFormParentCurIdxs(this, this.GetParentCurIdxs(), aIdxs));
this._currentValueIndices = aIdxs;
this._currentValueIndexes = aIdxs;
}
};
CBaseListField.prototype.GetParentCurIdxs = function(bInherit) {
let oParent = this.GetParent(true);
if (oParent == null)
return this._currentValueIndices;
return this._currentValueIndexes;
else if (bInherit === false || (this.GetPartialName() != null)) {
return this._currentValueIndices;
return this._currentValueIndexes;
}
if (oParent)

View File

@ -300,7 +300,7 @@
};
CComboBoxField.prototype.SetCurIdxs = function(aIdxs) {
if (this.IsWidget()) {
AscCommon.History.Add(new CChangesPDFListFormCurIdxs(this, this.GetCurIdxs(), aIdxs));
AscCommon.History.Add(new CChangesPDFListFormCurIdxs(this, this.GetParentCurIdxs(), aIdxs));
let aOptions = this.GetOptions();
if (undefined !== aIdxs[0]) {
@ -654,7 +654,7 @@
*/
CComboBoxField.prototype.GetCurIdxs = function(bApiValue) {
if (bApiValue)
return this._currentValueIndices;
return this._currentValueIndexes;
let aOptions = this.GetOptions();
let sValue = this.content.getAllText();

View File

@ -1103,7 +1103,7 @@
};
CListBoxField.prototype.GetCurIdxs = function(bApiValue) {
if (bApiValue)
return this._currentValueIndices;
return this._currentValueIndexes;
let oPara, oShd;
let aIndexes = [];