Surface: Issue #0004473: Expose openCommand() to translation

Continuing the work to expose the undo/redo functionality to translation. This commit does so for the Surface Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
This commit is contained in:
luz paz
2020-11-28 13:58:56 -05:00
committed by wwmayer
parent 9ef5832750
commit bd8b86b35a

View File

@@ -113,7 +113,7 @@ void CmdSurfaceCut::activated(int iMsg)
std::string BaseName = Sel[0].getFeatName();
std::string ToolName = Sel[1].getFeatName();
openCommand("Part Cut");
openCommand(QT_TRANSLATE_NOOP("Command", "Part Cut"));
doCommand(Doc,"App.activeDocument().addObject(\"Part::Cut\",\"%s\")",FeatName.c_str());
doCommand(Doc,"App.activeDocument().%s.Base = App.activeDocument().%s",FeatName.c_str(),BaseName.c_str());
doCommand(Doc,"App.activeDocument().%s.Tool = App.activeDocument().%s",FeatName.c_str(),ToolName.c_str());
@@ -147,7 +147,7 @@ void CmdSurfaceFilling::activated(int iMsg)
Q_UNUSED(iMsg);
std::string FeatName = getUniqueObjectName("Surface");
openCommand("Create surface");
openCommand(QT_TRANSLATE_NOOP("Command", "Create surface"));
doCommand(Doc, "App.ActiveDocument.addObject(\"Surface::Filling\",\"%s\")", FeatName.c_str());
doCommand(Doc, "Gui.ActiveDocument.setEdit('%s',0)", FeatName.c_str());
}
@@ -184,7 +184,7 @@ void CmdSurfaceGeomFillSurface::activated(int iMsg)
Q_UNUSED(iMsg);
std::string FeatName = getUniqueObjectName("Surface");
openCommand("Create surface");
openCommand(QT_TRANSLATE_NOOP("Command", "Create surface"));
doCommand(Doc, "App.ActiveDocument.addObject(\"Surface::GeomFillSurface\",\"%s\")", FeatName.c_str());
doCommand(Doc, "Gui.ActiveDocument.setEdit('%s',0)", FeatName.c_str());
}
@@ -246,7 +246,7 @@ void CmdSurfaceExtendFace::activated(int)
if (faceFilter.match()) {
const std::vector<std::string> &sub = faceFilter.Result[0][0].getSubNames();
if (sub.size() == 1) {
openCommand("Extend surface");
openCommand(QT_TRANSLATE_NOOP("Command", "Extend surface"));
std::string FeatName = getUniqueObjectName("Surface");
std::string supportString = faceFilter.Result[0][0].getAsPropertyLinkSubString();
doCommand(Doc, "App.ActiveDocument.addObject(\"Surface::Extend\",\"%s\")", FeatName.c_str());
@@ -286,7 +286,7 @@ void CmdSurfaceSections::activated(int iMsg)
Q_UNUSED(iMsg);
std::string FeatName = getUniqueObjectName("Surface");
openCommand("Create surface");
openCommand(QT_TRANSLATE_NOOP("Command", "Create surface"));
doCommand(Doc, "App.ActiveDocument.addObject(\"Surface::Sections\",\"%s\")", FeatName.c_str());
doCommand(Doc, "Gui.ActiveDocument.setEdit('%s',0)", FeatName.c_str());
}