Add hooks so Gui classes can be seen by DXF importer

This commit is contained in:
Kevin Martin
2023-11-24 11:51:05 -05:00
committed by Yorik van Havre
parent aa1f75ef0e
commit 37e6c19a4b
6 changed files with 204 additions and 4 deletions

View File

@@ -363,6 +363,13 @@ private:
return Py::None();
}
// This readDXF method is an almost exact duplicate of the one in ImportGui::Module.
// The only difference is the CDxfRead class derivation that is created.
// It would seem desirable to have most of this code in just one place, passing it
// e.g. a pointer to a function that does the 4 lines during the lifetime of the
// CDxfRead object, but right now Import::Module and ImportGui::Module cannot see
// each other's functions so this shared code would need some place to live where
// both places could include a declaration.
Py::Object readDXF(const Py::Tuple& args)
{
char* Name = nullptr;