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

@@ -141,7 +141,7 @@ void CmdSketcherToggleConstruction::activated(int iMsg)
{
Q_UNUSED(iMsg);
// Option A: nothing is selected change creation mode from/to construction
if (Gui::Selection().countObjectsOfType(Sketcher::SketchObject::getClassTypeId()) == 0) {
if (Gui::Selection().countObjectsOfType<Sketcher::SketchObject>() == 0) {
Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager();