[TD]Hatch - handle empty parameter - use default
This commit is contained in:
@@ -270,6 +270,9 @@ std::string DrawHatch::prefSvgHatch(void)
|
||||
std::string defaultDir = App::Application::getResourceDir() + "Mod/TechDraw/Patterns/";
|
||||
std::string defaultFileName = defaultDir + "simple.svg";
|
||||
std::string result = hGrp->GetASCII("FileHatch",defaultFileName.c_str());
|
||||
if (result.empty()) {
|
||||
result = defaultFileName;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -441,11 +441,11 @@ void QGIViewPart::draw() {
|
||||
|
||||
void QGIViewPart::drawViewPart()
|
||||
{
|
||||
// Base::Console().Message("QGIVP::DVP()\n");
|
||||
auto viewPart( dynamic_cast<TechDraw::DrawViewPart *>(getViewObject()) );
|
||||
if ( viewPart == nullptr ) {
|
||||
return;
|
||||
}
|
||||
// Base::Console().Message("QGIVP::DVP() - %s / %s\n", viewPart->getNameInDocument(), viewPart->Label.getValue());
|
||||
if (!viewPart->hasGeometry()) {
|
||||
removePrimitives(); //clean the slate
|
||||
removeDecorations();
|
||||
@@ -508,7 +508,7 @@ void QGIViewPart::drawViewPart()
|
||||
}
|
||||
}
|
||||
} else if (fHatch) {
|
||||
if (!fHatch->HatchPattern.isEmpty()) {
|
||||
if (!fHatch->SvgIncluded.isEmpty()) {
|
||||
if (getExporting()) {
|
||||
newFace->hideSvg(true);
|
||||
newFace->isHatched(false);
|
||||
|
||||
Reference in New Issue
Block a user