363 // Delete the objects that were being selected |
363 // Delete the objects that were being selected |
364 for (LDObject* obj : selCopy) |
364 for (LDObject* obj : selCopy) |
365 obj->destroy(); |
365 obj->destroy(); |
366 |
366 |
367 refresh(); |
367 refresh(); |
368 return length(selCopy); |
368 return countof(selCopy); |
369 } |
369 } |
370 |
370 |
371 // --------------------------------------------------------------------------------------------------------------------- |
371 // --------------------------------------------------------------------------------------------------------------------- |
372 // |
372 // |
373 void MainWindow::buildObjectList() |
373 void MainWindow::buildObjectList() |
717 |
717 |
718 // --------------------------------------------------------------------------------------------------------------------- |
718 // --------------------------------------------------------------------------------------------------------------------- |
719 // |
719 // |
720 void MainWindow::spawnContextMenu (const QPoint& position) |
720 void MainWindow::spawnContextMenu (const QPoint& position) |
721 { |
721 { |
722 const bool single = (length(selectedObjects()) == 1); |
722 const bool single = (countof(selectedObjects()) == 1); |
723 LDObject* singleObj = single ? selectedObjects().first() : nullptr; |
723 LDObject* singleObj = single ? selectedObjects().first() : nullptr; |
724 |
724 |
725 bool hasSubfiles = false; |
725 bool hasSubfiles = false; |
726 |
726 |
727 for (LDObject* obj : selectedObjects()) |
727 for (LDObject* obj : selectedObjects()) |