Import: Use proper location for DXF prefs

Currently if users enabled the "Treat ellipses and splines as polylines"
option in DXF export preferences and exported them, they were still
being exported as native primitives.

This was because we were reading from a wrong preferences location, UI
stored it in `BaseApp/Preferences/Mod/Draft`, but it was read from
`BaseApp/Preferences/Mod/Import`. Since the pref didn't exist, we were
taking default value which was set to `false`.

So the solution is obvious - just set it to the correct path.
This commit is contained in:
tetektoza
2025-10-26 14:26:02 +01:00
parent 529aae0238
commit 34eafe127e
2 changed files with 3 additions and 3 deletions

View File

@@ -439,7 +439,7 @@ private:
std::string filePath;
std::string layerName;
const char* optionSource = nullptr;
std::string defaultOptions = "User parameter:BaseApp/Preferences/Mod/Import";
std::string defaultOptions = "User parameter:BaseApp/Preferences/Mod/Draft";
int versionParm = -1;
bool versionOverride = false;
bool polyOverride = false;
@@ -551,7 +551,7 @@ private:
std::string filePath;
std::string layerName;
const char* optionSource = nullptr;
std::string defaultOptions = "User parameter:BaseApp/Preferences/Mod/Import";
std::string defaultOptions = "User parameter:BaseApp/Preferences/Mod/Draft";
int versionParm = -1;
bool versionOverride = false;
bool polyOverride = false;

View File

@@ -1648,7 +1648,7 @@ point3D gPntTopoint3D(gp_Pnt& p)
ImpExpDxfWrite::ImpExpDxfWrite(std::string filepath)
: CDxfWrite(filepath.c_str())
{
setOptionSource("User parameter:BaseApp/Preferences/Mod/Import");
setOptionSource("User parameter:BaseApp/Preferences/Mod/Draft");
setOptions();
}