Add template based Document::countObjectsOfType

Also convert code to use this new method
This commit is contained in:
Benjamin Nauck
2025-01-11 20:00:24 +01:00
parent 74f3aee9a7
commit 08fe94ef25
14 changed files with 40 additions and 40 deletions

View File

@@ -64,6 +64,7 @@
#include <Mod/Part/App/PartFeature.h>
#include <Mod/Part/App/PrimitiveFeature.h>
#include <Mod/Part/App/DatumFeature.h>
#include <Mod/Part/App/FeatureMirroring.h>
#include <App/Datums.h>
#include "Mirroring.h"
@@ -289,7 +290,7 @@ bool Mirroring::accept()
}
Gui::WaitCursor wc;
unsigned int count = activeDoc->countObjectsOfType(Base::Type::fromName("Part::Mirroring"));
unsigned int count = activeDoc->countObjectsOfType<Part::Mirroring>();
activeDoc->openTransaction("Mirroring");
QString shape, label, selectionString;