Add template based SelectionSingleton::countObjectsOfType

Also convert code to use this new method
This commit is contained in:
Benjamin Nauck
2025-01-10 19:09:50 +01:00
parent 460da406f8
commit 74f3aee9a7
22 changed files with 148 additions and 165 deletions

View File

@@ -158,7 +158,7 @@ void Workbench::deactivated()
void Workbench::setupContextMenu(const char* recipient, Gui::MenuItem* item) const
{
StdWorkbench::setupContextMenu(recipient, item);
if (Gui::Selection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) {
if (Gui::Selection().countObjectsOfType<Mesh::Feature>() > 0) {
*item << "Separator"
<< "Mesh_Import"
<< "Mesh_Export"