[Toponaming] create ElementMap class (#9175)
* Copypaste ElementMap * Add MappedNameRef * Fix missing include * Copypaste `findTagInElementName` * fix error introduced _somewhere_ * refactor toponaming constants * Move `findTagInElementName` in `MappedName` * reintroduce workaround to compile ElementMap * Added missing functions copied from complexgeodata * fix last compile errors, reorder and format files * remove recursive refs to ComplexGeoData * Add more comments * fixed comments and added tests * added FIXME, make functions private, misc fixes * Move static functions from complexGeoData to PostfixStringReferences. Rename to ElementNamingUtils * Fix broken includes due to previous change * Revert constants from string to const char* * added childmap tests and made hasher public * Make functions private * Added remaining tests * removed bool return from `erase` functions * fix missing appexport Co-authored-by: John Dupuy <jdupuy98@gmail.com>
This commit is contained in:
@@ -36,11 +36,11 @@
|
||||
#endif
|
||||
|
||||
#include <App/AutoTransaction.h>
|
||||
#include <App/ComplexGeoData.h>
|
||||
#include <App/Document.h>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/DocumentObjectGroup.h>
|
||||
#include <App/Transactions.h>
|
||||
#include <App/ElementNamingUtils.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Matrix.h>
|
||||
@@ -408,7 +408,7 @@ bool Document::setEdit(Gui::ViewProvider* p, int ModNum, const char *subname)
|
||||
d->_editSubname.clear();
|
||||
|
||||
if (subname) {
|
||||
const char *element = Data::ComplexGeoData::findElementName(subname);
|
||||
const char *element = Data::findElementName(subname);
|
||||
if (element) {
|
||||
d->_editSubname = std::string(subname,element-subname);
|
||||
d->_editSubElement = element;
|
||||
|
||||
Reference in New Issue
Block a user