Gui: use empty
This commit is contained in:
@@ -631,7 +631,7 @@ void PropertyEditor::contextMenuEvent(QContextMenuEvent *) {
|
||||
continue;
|
||||
for(auto parent=item;parent;parent=parent->parent()) {
|
||||
const auto &ps = parent->getPropertyData();
|
||||
if(ps.size()) {
|
||||
if(!ps.empty()) {
|
||||
props.insert(ps.begin(),ps.end());
|
||||
break;
|
||||
}
|
||||
@@ -655,7 +655,7 @@ void PropertyEditor::contextMenuEvent(QContextMenuEvent *) {
|
||||
}
|
||||
|
||||
if(PropertyView::showAll()) {
|
||||
if(props.size()) {
|
||||
if(!props.empty()) {
|
||||
menu.addAction(tr("Add property"))->setData(QVariant(MA_AddProp));
|
||||
if (std::all_of(props.begin(), props.end(), [](auto prop) {
|
||||
return prop->testStatus(App::Property::PropDynamic)
|
||||
@@ -681,7 +681,7 @@ void PropertyEditor::contextMenuEvent(QContextMenuEvent *) {
|
||||
if(canRemove)
|
||||
menu.addAction(tr("Remove property"))->setData(QVariant(MA_RemoveProp));
|
||||
|
||||
if(props.size()) {
|
||||
if(!props.empty()) {
|
||||
menu.addSeparator();
|
||||
|
||||
QAction *action;
|
||||
|
||||
Reference in New Issue
Block a user