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

Continuing the work to expose the undo/redo functionality to translation. This commit does so for the Part Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
This commit is contained in:
luz paz
2020-11-27 20:51:47 -05:00
committed by wwmayer
parent 2befcd9502
commit 5aff8cdd0b
8 changed files with 31 additions and 31 deletions

View File

@@ -237,7 +237,7 @@ void ShapeBuilderWidget::createEdgeFromVertex()
).arg(elements[0]).arg(elements[1]);
try {
Gui::Application::Instance->activeDocument()->openCommand("Edge");
Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Edge"));
Gui::Command::runCommand(Gui::Command::App, cmd.toLatin1());
Gui::Application::Instance->activeDocument()->commitCommand();
}
@@ -278,7 +278,7 @@ void ShapeBuilderWidget::createWireFromEdge()
"del _\n"
).arg(list);
try {
Gui::Application::Instance->activeDocument()->openCommand("Wire");
Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Wire"));
Gui::Command::runCommand(Gui::Command::App, cmd.toLatin1());
Gui::Application::Instance->activeDocument()->commitCommand();
}
@@ -330,7 +330,7 @@ void ShapeBuilderWidget::createFaceFromVertex()
}
try {
Gui::Application::Instance->activeDocument()->openCommand("Face");
Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Face"));
Gui::Command::runCommand(Gui::Command::App, cmd.toLatin1());
Gui::Application::Instance->activeDocument()->commitCommand();
}
@@ -382,7 +382,7 @@ void ShapeBuilderWidget::createFaceFromEdge()
}
try {
Gui::Application::Instance->activeDocument()->openCommand("Face");
Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Face"));
Gui::Command::runCommand(Gui::Command::App, cmd.toLatin1());
Gui::Application::Instance->activeDocument()->commitCommand();
}
@@ -445,7 +445,7 @@ void ShapeBuilderWidget::createShellFromFace()
}
try {
Gui::Application::Instance->activeDocument()->openCommand("Shell");
Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Shell"));
Gui::Command::runCommand(Gui::Command::App, cmd.toLatin1());
Gui::Application::Instance->activeDocument()->commitCommand();
}
@@ -497,7 +497,7 @@ void ShapeBuilderWidget::createSolidFromShell()
}
try {
Gui::Application::Instance->activeDocument()->openCommand("Solid");
Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Solid"));
Gui::Command::runCommand(Gui::Command::App, cmd.toLatin1());
Gui::Application::Instance->activeDocument()->commitCommand();
}