do not use translated text for icon names

This commit is contained in:
wmayer
2017-04-15 12:58:35 +02:00
parent d6214383ce
commit e96aafd6e1
3 changed files with 19 additions and 10 deletions

View File

@@ -69,7 +69,7 @@ using namespace Attacher;
TaskDatumParameters::TaskDatumParameters(ViewProviderDatum *ViewProvider,QWidget *parent)
: PartGui::TaskAttacher(ViewProvider, parent, QString::fromLatin1("PartDesign_") + ViewProvider->datumType,
ViewProvider->datumType + tr(" parameters"))
ViewProvider->datumText + tr(" parameters"))
{
Gui::Selection().addSelectionGate(new NoDependentsSelection(ViewProvider->getObject()));
ViewProvider->setPickable(false);

View File

@@ -116,14 +116,22 @@ void ViewProviderDatum::attach(App::DocumentObject *obj)
// TODO remove this field (2015-09-08, Fat-Zer)
App::DocumentObject* o = getObject();
if (o->getTypeId() == PartDesign::Plane::getClassTypeId())
datumType = QObject::tr("Plane");
else if (o->getTypeId() == PartDesign::Line::getClassTypeId())
datumType = QObject::tr("Line");
else if (o->getTypeId() == PartDesign::Point::getClassTypeId())
datumType = QObject::tr("Point");
else if (o->getTypeId() == PartDesign::CoordinateSystem::getClassTypeId())
datumType = QObject::tr("CoordinateSystem");
if (o->getTypeId() == PartDesign::Plane::getClassTypeId()) {
datumType = QString::fromLatin1("Plane");
datumText = QObject::tr("Plane");
}
else if (o->getTypeId() == PartDesign::Line::getClassTypeId()) {
datumType = QString::fromLatin1("Line");
datumText = QObject::tr("Line");
}
else if (o->getTypeId() == PartDesign::Point::getClassTypeId()) {
datumType = QString::fromLatin1("Point");
datumText = QObject::tr("Point");
}
else if (o->getTypeId() == PartDesign::CoordinateSystem::getClassTypeId()) {
datumType = QString::fromLatin1("CoordinateSystem");
datumText = QObject::tr("Coordinate System");
}
SoShapeHints* hints = new SoShapeHints();
hints->shapeType.setValue(SoShapeHints::UNKNOWN_SHAPE_TYPE);
@@ -221,7 +229,7 @@ bool ViewProviderDatum::isSelectable(void) const
void ViewProviderDatum::setupContextMenu(QMenu* menu, QObject* receiver, const char* member)
{
QAction* act;
act = menu->addAction(QObject::tr("Edit datum ") + datumType, receiver, member);
act = menu->addAction(QObject::tr("Edit datum"), receiver, member);
act->setData(QVariant((int)ViewProvider::Default));
}

View File

@@ -85,6 +85,7 @@ public:
/// The datum type (Plane, Line or Point)
// TODO remove this attribute (2015-09-08, Fat-Zer)
QString datumType;
QString datumText;
/**
* Computes appropriate bounding box for the given list of objects to be passed to setExtents ()