From ac0d56b961901b60630f9c4f1beb5387fd6dc694 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Mon, 4 Apr 2022 08:23:41 +0800 Subject: [PATCH] Code change according to suggestion --- src/Gui/propertyeditor/PropertyItem.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index 1e1067f8bf..02d541b485 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -25,6 +25,7 @@ #ifndef _PreComp_ # include +# include # include # include # include @@ -32,8 +33,6 @@ # include # include # include -# include -# include # include # include #endif @@ -2927,7 +2926,7 @@ QWidget* PropertyEnumItem::createEditor(QWidget* parent, const QObject* receiver field = field.trimmed(); auto it = children->end(); if (field.isEmpty()) { - if (children->size()) + if (!children->empty()) --it; else continue;