+ limit display role of property list items to 10 elements
This commit is contained in:
@@ -2003,6 +2003,10 @@ QVariant PropertyStringListItem::editorData(QWidget *editor) const
|
||||
Gui::LabelEditor *le = qobject_cast<Gui::LabelEditor*>(editor);
|
||||
QString complete = le->text();
|
||||
QStringList list = complete.split(QChar::fromAscii('\n'));
|
||||
return QVariant(list);
|
||||
}
|
||||
|
||||
QVariant PropertyStringListItem::toString(const QVariant& prop) const
|
||||
{
|
||||
QStringList list = prop.toStringList();
|
||||
if (list.size() > 10) {
|
||||
@@ -2072,6 +2076,10 @@ QVariant PropertyFloatListItem::editorData(QWidget *editor) const
|
||||
Gui::LabelEditor *le = qobject_cast<Gui::LabelEditor*>(editor);
|
||||
QString complete = le->text();
|
||||
QStringList list = complete.split(QChar::fromAscii('\n'));
|
||||
return QVariant(list);
|
||||
}
|
||||
|
||||
QVariant PropertyFloatListItem::toString(const QVariant& prop) const
|
||||
{
|
||||
QStringList list = prop.toStringList();
|
||||
if (list.size() > 10) {
|
||||
@@ -2141,6 +2149,10 @@ QVariant PropertyIntegerListItem::editorData(QWidget *editor) const
|
||||
Gui::LabelEditor *le = qobject_cast<Gui::LabelEditor*>(editor);
|
||||
QString complete = le->text();
|
||||
QStringList list = complete.split(QChar::fromAscii('\n'));
|
||||
return QVariant(list);
|
||||
}
|
||||
|
||||
QVariant PropertyIntegerListItem::toString(const QVariant& prop) const
|
||||
{
|
||||
QStringList list = prop.toStringList();
|
||||
if (list.size() > 10) {
|
||||
|
||||
Reference in New Issue
Block a user