mirror of https://github.com/CGAL/cgal
copy the buffer to allow modifications during iteration
This commit is contained in:
parent
120547bee7
commit
a8c58f8747
|
|
@ -376,7 +376,8 @@ void filterMenuOperations(QMenu* menu, QString filter, bool keep_from_here)
|
|||
buffer.append(action);
|
||||
|
||||
while(!buffer.isEmpty()){
|
||||
for(QAction* action : buffer) {
|
||||
QList<QAction*> buffer_copy=buffer; // make a copy as we modify buffer in the loop
|
||||
for(QAction* action : buffer_copy) {
|
||||
if(QMenu* submenu = action->menu())
|
||||
{
|
||||
bool keep = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue