[TD]embed geom hatch file in document

This commit is contained in:
wandererfan
2020-01-11 10:22:27 -05:00
committed by WandererFan
parent c3088fab71
commit 879a259d81
3 changed files with 125 additions and 18 deletions

View File

@@ -220,13 +220,18 @@ void DrawHatch::replaceSvgIncluded(std::string newSvgFile)
void DrawHatch::onDocumentRestored()
{
//if this is a restore, we should be checking for SvgIncluded empty,
// if it is, set it up from hatchPattern,
// else, don't do anything
// Base::Console().Message("DH::onDocumentRestored()\n");
if (!HatchPattern.isEmpty()) {
std::string svgFileName = HatchPattern.getValue();
Base::FileInfo tfi(svgFileName);
if (tfi.isReadable()) {
if (SvgIncluded.isEmpty()) {
setupSvgIncluded();
if (SvgIncluded.isEmpty()) {
if (!HatchPattern.isEmpty()) {
std::string svgFileName = HatchPattern.getValue();
Base::FileInfo tfi(svgFileName);
if (tfi.isReadable()) {
if (SvgIncluded.isEmpty()) {
setupSvgIncluded();
}
}
}
}