do not use translated text for icon names
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ()
|
||||
|
||||
Reference in New Issue
Block a user