Skip to content

Commit

Permalink
Surface: Issue #4473: Expose openCommand() to translation
Browse files Browse the repository at this point in the history
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
  • Loading branch information
luzpaz authored and wwmayer committed Dec 1, 2020
1 parent 9ef5832 commit bd8b86b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Mod/Surface/Gui/Command.cpp
Expand Up @@ -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());
Expand Down Expand Up @@ -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());
}
Expand Down Expand Up @@ -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());
}
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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());
}
Expand Down

0 comments on commit bd8b86b

Please sign in to comment.