- if (buf)
- addWithStatusCheck(MenuItem(MenuItem::Command, label,
- FuncRequest(action, (*fit)->name())));
- else
- add(MenuItem(MenuItem::Command, label,
- FuncRequest(action, (*fit)->name())));
+ if (view_update) {
+ if (buf)
+ item.submenu().addWithStatusCheck(MenuItem(MenuItem::Command, label,
+ FuncRequest(action, (*fit)->name())));
+ else
+ item.submenu().add(MenuItem(MenuItem::Command, label,
+ FuncRequest(action, (*fit)->name())));
+ } else {
+ if (buf)
+ addWithStatusCheck(MenuItem(MenuItem::Command, label,
+ FuncRequest(action, (*fit)->name())));
+ else
+ add(MenuItem(MenuItem::Command, label,
+ FuncRequest(action, (*fit)->name())));
+ }