[TD]assorted Preference updates

- section line convention label
- remove superfluous save/restore on changeEvent
- change default scrub count
- add preference for default symbol dir
- add preference for display of section cut line
This commit is contained in:
wandererfan
2024-05-17 18:31:36 -04:00
committed by WandererFan
parent 6a947afda5
commit ff17df2ff5
20 changed files with 574 additions and 442 deletions

View File

@@ -697,8 +697,10 @@ void QGIViewPart::drawAllSectionLines()
return;
auto vp = static_cast<ViewProviderViewPart*>(getViewProvider(getViewObject()));
if (!vp)
if (!vp) {
return;
}
if (vp->ShowSectionLine.getValue()) {
auto refs = viewPart->getSectionRefs();
for (auto& r : refs) {
@@ -776,11 +778,18 @@ void QGIViewPart::drawSectionLine(TechDraw::DrawViewSection* viewSection, bool b
//set the general parameters
sectionLine->setPos(0.0, 0.0);
// sectionLines are typically ISO 8 (long dash, short dash) or ISO 4 (long dash, dot)
sectionLine->setLinePen(
m_dashedLineGenerator->getLinePen((size_t)vp->SectionLineStyle.getValue(),
vp->HiddenWidth.getValue()));
sectionLine->setWidth(Rez::guiX(vp->HiddenWidth.getValue()));
if (vp->IncludeCutLine.getValue()) {
sectionLine->setShowLine(true);
// sectionLines are typically ISO 8 (long dash, short dash) or ISO 4 (long dash, dot)
sectionLine->setLinePen(
m_dashedLineGenerator->getLinePen((size_t)vp->SectionLineStyle.getValue(),
vp->HiddenWidth.getValue()));
sectionLine->setWidth(Rez::guiX(vp->HiddenWidth.getValue()));
} else {
sectionLine->setShowLine(false);
}
double fontSize = Preferences::dimFontSizeMM();
sectionLine->setFont(getFont(), fontSize);
sectionLine->setZValue(ZVALUE::SECTIONLINE);
@@ -857,11 +866,18 @@ void QGIViewPart::drawComplexSectionLine(TechDraw::DrawViewSection* viewSection,
//set the general parameters
sectionLine->setPos(0.0, 0.0);
// sectionLines are typically ISO 8 (long dash, short dash) or ISO 4 (long dash, dot)
sectionLine->setLinePen(
m_dashedLineGenerator->getLinePen((size_t)vp->SectionLineStyle.getValue(),
vp->HiddenWidth.getValue()));
sectionLine->setWidth(Rez::guiX(vp->HiddenWidth.getValue()));
if (vp->IncludeCutLine.getValue()) {
sectionLine->setShowLine(true);
// sectionLines are typically ISO 8 (long dash, short dash) or ISO 4 (long dash, dot)
sectionLine->setLinePen(
m_dashedLineGenerator->getLinePen((size_t)vp->SectionLineStyle.getValue(),
vp->HiddenWidth.getValue()));
sectionLine->setWidth(Rez::guiX(vp->HiddenWidth.getValue()));
} else {
sectionLine->setShowLine(false);
}
double fontSize = Preferences::dimFontSizeMM();
sectionLine->setFont(getFont(), fontSize);
sectionLine->setZValue(ZVALUE::SECTIONLINE);