Attacher: change Part2DObject's MapMode default to mmDeactivated, and set mode to mmFlatFace only when reading files of old format.

PartDesign, Sketcher: set mapping mode when setting support

Mapping mode mmFlatFace is no longer default, so an explicit assignment
is required.
This commit is contained in:
DeepSOIC
2015-07-02 15:26:16 +03:00
committed by Stefan Tröger
parent 9a48d210cf
commit b6152364af
4 changed files with 10 additions and 2 deletions

View File

@@ -373,6 +373,9 @@ void Workbench::fixSketchSupport (Sketcher::SketchObject* sketch)
// One of the base planes
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.Support = (App.activeDocument().%s,['%s'])",
sketch->getNameInDocument(), App::Part::BaseplaneTypes[index], side.c_str());
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.MapMode = '%s'",
sketch->getNameInDocument(), Attacher::AttachEngine::eMapModeStrings[Attacher::mmFlatFace]);
} else {
// Offset to base plane
// Find out which direction we need to offset
@@ -392,6 +395,8 @@ void Workbench::fixSketchSupport (Sketcher::SketchObject* sketch)
body->getNameInDocument(), Datum.c_str(), sketch->getNameInDocument());
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.Support = (App.activeDocument().%s,['%s'])",
sketch->getNameInDocument(), Datum.c_str(), side.c_str());
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.MapMode = '%s'",
sketch->getNameInDocument(),Attacher::AttachEngine::eMapModeStrings[Attacher::mmFlatFace]);
Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().recompute()"); // recompute the feature based on its references
}
}