From 34eafe127eedb009a4ae5bc0f426c97f21dc8998 Mon Sep 17 00:00:00 2001 From: tetektoza Date: Sun, 26 Oct 2025 14:26:02 +0100 Subject: [PATCH] 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. --- src/Mod/Import/App/AppImportPy.cpp | 4 ++-- src/Mod/Import/App/dxf/ImpExpDxf.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Import/App/AppImportPy.cpp b/src/Mod/Import/App/AppImportPy.cpp index da6bc79b26..197d705a2b 100644 --- a/src/Mod/Import/App/AppImportPy.cpp +++ b/src/Mod/Import/App/AppImportPy.cpp @@ -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; diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.cpp b/src/Mod/Import/App/dxf/ImpExpDxf.cpp index 0cbb575308..88234c72b5 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.cpp +++ b/src/Mod/Import/App/dxf/ImpExpDxf.cpp @@ -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(); }