feat: .kc file format — Layer 1 (format registration)
Cherry-picked from feat/kc-file-format-layer1 (723a8c98d5).
- Document.cpp: checkFileName() accepts .kc extension
- FreeCADInit.py: register .kc import type
- Dialog filters: Save As, Save Copy, Merge, Project Utility
- kc_format.py: DocumentObserver preserves silo/ entries across saves
- InitGui.py: register kc_format observer on startup
This commit is contained in:
@@ -1728,7 +1728,7 @@ static std::string checkFileName(const char* file)
|
||||
.GetParameterGroupByPath("User parameter:BaseApp/Preferences/Document")
|
||||
->GetBool("CheckExtension", true)) {
|
||||
const char* ext = strrchr(file, '.');
|
||||
if ((ext == nullptr) || !boost::iequals(ext + 1, "fcstd")) {
|
||||
if ((ext == nullptr) || (!boost::iequals(ext + 1, "fcstd") && !boost::iequals(ext + 1, "kc"))) {
|
||||
if (ext && ext[1] == 0) {
|
||||
fn += "FCStd";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user