PIValueTreeEdit: fix default min/max attributes, hide "expression"

This commit is contained in:
2023-05-17 14:46:23 +03:00
parent f37a8e6d93
commit 1b7511eef2
2 changed files with 9 additions and 8 deletions

View File

@@ -109,7 +109,8 @@ void PIValueTreeEditParameters::createAttributes(QList<PIVariantEdit *> & list,
QFormLayout * lay, QFormLayout * lay,
const PIVariantMap & attr, const PIVariantMap & attr,
bool inv_filter) { bool inv_filter) {
static PIStringList hidden({"type", Attribute::hidden, Attribute::readOnly, Attribute::isLabel, Attribute::arrayType}); static PIStringList hidden(
{"type", Attribute::hidden, Attribute::readOnly, Attribute::isLabel, Attribute::arrayType, Attribute::expression});
static PIStringList filter({Attribute::arrayMinCount, Attribute::arrayMaxCount, Attribute::arrayReorder, Attribute::arrayResize}); static PIStringList filter({Attribute::arrayMinCount, Attribute::arrayMaxCount, Attribute::arrayReorder, Attribute::arrayResize});
list.clear(); list.clear();
while (lay->rowCount() > 0) while (lay->rowCount() > 0)

View File

@@ -155,13 +155,13 @@ PIVariantMap PIVariantEditors::NumberBase::attributes() const {
PIVariantMap PIVariantEditors::NumberBase::defaultAttributes() { PIVariantMap PIVariantEditors::NumberBase::defaultAttributes() {
return { return {
{Attribute::widgetType, createTypes() }, {Attribute::widgetType, createTypes() },
{Attribute::minimum, -std::numeric_limits<int>::max()}, {Attribute::minimum, -std::numeric_limits<short>::max()},
{Attribute::maximum, std::numeric_limits<int>::max() }, {Attribute::maximum, std::numeric_limits<short>::max() },
{Attribute::singleStep, 1. }, {Attribute::singleStep, 1. },
{Attribute::decimals, 3 }, {Attribute::decimals, 3 },
{Attribute::prefix, "" }, {Attribute::prefix, "" },
{Attribute::suffix, "" }, {Attribute::suffix, "" },
}; };
} }