[TD]fix hatch fail due to missing translate method

This commit is contained in:
wandererfan
2023-09-14 11:06:42 -04:00
committed by WandererFan
parent 10b3ae382f
commit 1b64b265ae
8 changed files with 114 additions and 0 deletions

View File

@@ -41,6 +41,7 @@
using namespace TechDraw;
using DU = DrawUtil;
PROPERTY_SOURCE(TechDraw::DrawHatch, App::DocumentObject)
@@ -201,6 +202,13 @@ bool DrawHatch::isBitmapHatch(void) const
return fi.hasExtension({"bmp", "png", "jpg", "jpeg"});
}
//! get a translated label string from the context (ex TaskActiveView), the base name (ex ActiveView) and
//! the unique name within the document (ex ActiveView001), and use it to update the Label property.
void DrawHatch::translateLabel(std::string context, std::string baseName, std::string uniqueName)
{
Label.setValue(DU::translateArbitrary(context, baseName, uniqueName));
}
//standard preference getters
std::string DrawHatch::prefSvgHatch(void)
{