Sketcher: Translate the attacher GUI dropdown

This commit is contained in:
Chris Hennes
2023-04-21 14:41:07 -05:00
committed by abdullahtahiriyo
parent a6adfc58b6
commit c0b5fb2f8c

View File

@@ -49,6 +49,7 @@
#include <Mod/Sketcher/App/Constraint.h>
#include <Mod/Sketcher/App/SketchObject.h>
#include <Mod/Part/App/Attacher.h>
#include <Mod/Part/Gui/AttacherTexts.h>
#include <Mod/Part/App/Part2DObject.h>
#include "SketchMirrorDialog.h"
@@ -584,7 +585,10 @@ void CmdSketcherMapSketch::activated(int iMsg)
int iSugg = 0; //index of the auto-suggested mode in the list of valid modes
int iCurr = 0; //index of current mode in the list of valid modes
for (size_t i = 0; i < validModes.size(); ++i) {
items.push_back(QString::fromLatin1(AttachEngine::getModeName(validModes[i]).c_str()));
// Get the 2-element vector of caption, tooltip -- this class cannot use the tooltip,
// so it is just ignored.
auto uiStrings = AttacherGui::getUIStrings(AttachEnginePlane::getClassTypeId(), validModes[i]);
items.push_back(uiStrings[0]);
if (validModes[i] == curMapMode) {
iCurr = items.size() - 1;
items.back().append(bCurIncompatible?