[PE] Fix update combo view for insert shape

This commit is contained in:
Alexey Koshelev
2024-10-25 18:32:09 +03:00
parent 20a466e652
commit 070f3c3009

View File

@ -2297,19 +2297,22 @@ define([
me.toolbar.updateComboAutoshapeMenu(collection);
menu.off('show:before', onComboShowBefore);
}
var onComboClick = function(btn, record, cancel) {
if (cancel) {
me._addAutoshape(false);
return;
}
if (record) {
me.toolbar.cmbsInsertShape.forEach(function(cmb) {
cmb.updateComboView(record);
});
me.onInsertShape(record.get('data').shapeType);
}
}
me.toolbar.cmbsInsertShape.forEach(function(cmb) {
cmb.openButton.menu.on('show:before', onComboShowBefore);
cmb.fillComboView(collection);
cmb.on('click', function (btn, record, cancel) {
if (cancel) {
me._addAutoshape(false);
return;
}
if (record) {
cmb.updateComboView(record);
me.onInsertShape(record.get('data').shapeType);
}
});
cmb.on('click', onComboClick);
});
},