Commit 01f0e727 authored by VESIN Marc's avatar VESIN Marc
Browse files

misc style for if/then/else

parent 1407d0ac
Pipeline #209881 passed with stage
in 0 seconds
......@@ -147,10 +147,12 @@ dtkWidgetsMenuItem *dtkWidgetsMenu::addItem(dtkWidgetsMenuItem *item)
}
if (!d->object_hash.contains(item->title())) {
d->object_hash.insert(item->title(), item);
if (item->isParameter())
d->object_hash_uid.insert((dynamic_cast<dtkWidgetsMenuItemParameter *>(item))->parameter()->uid(), item);
else
if (item->isParameter()) {
dtkWidgetsMenuItemParameter *item_param = dynamic_cast<dtkWidgetsMenuItemParameter *>(item);
d->object_hash_uid.insert(item_param->parameter()->uid(), item);
} else {
d->object_hash_uid.insert(item->title(), item);
}
d->object_list << item;
return item;
}
......@@ -180,10 +182,12 @@ dtkWidgetsMenuItem *dtkWidgetsMenu::insertItem(int pos, dtkWidgetsMenuItem *item
}
if ( !d->object_hash.contains(item->title()) ) {
d->object_hash.insert(item->title(), item);
if (item->isParameter())
d->object_hash_uid.insert((dynamic_cast<dtkWidgetsMenuItemParameter *>(item))->parameter()->uid(), item);
else
if (item->isParameter()) {
dtkWidgetsMenuItemParameter *item_param = dynamic_cast<dtkWidgetsMenuItemParameter *>(item);
d->object_hash_uid.insert(item_param->parameter()->uid(), item);
} else {
d->object_hash_uid.insert(item->title(), item);
}
d->object_list.insert(pos, item);
return item;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment