Control Face edges from Part/Section

This commit is contained in:
WandererFan 2016-09-13 10:19:41 -04:00
parent 664168992f
commit ecbd8c8dc0
4 changed files with 11 additions and 0 deletions

View File

@ -109,6 +109,14 @@ void QGIFace::setFill(QBrush b) {
m_styleNormal = b.style(); m_styleNormal = b.style();
} }
void QGIFace::setDrawEdges(bool b) {
if (b) {
setStyle(Qt::DashLine);
} else {
setStyle(Qt::NoPen); //don't draw face lines, just fill
}
}
void QGIFace::resetFill() { void QGIFace::resetFill() {
m_colNormalFill = m_colDefFill; m_colNormalFill = m_colDefFill;
m_styleNormal = m_styleDef; m_styleNormal = m_styleDef;

View File

@ -65,6 +65,7 @@ public:
void setPath(const QPainterPath & path); void setPath(const QPainterPath & path);
void buildHatch(void); void buildHatch(void);
void setHatchColor(std::string c); void setHatchColor(std::string c);
void setDrawEdges(bool b);
void toggleSvg(bool b); void toggleSvg(bool b);
protected: protected:

View File

@ -311,6 +311,7 @@ void QGIViewPart::drawViewPart()
newFace->setHatch(fHatch->HatchPattern.getValue()); newFace->setHatch(fHatch->HatchPattern.getValue());
} }
} }
newFace->setDrawEdges(false);
newFace->setZValue(ZVALUE::FACE); newFace->setZValue(ZVALUE::FACE);
newFace->setPrettyNormal(); newFace->setPrettyNormal();
} }

View File

@ -79,6 +79,7 @@ void QGIViewSection::drawSectionFace()
QGIFace* newFace = drawFace(*fit,-1); //TODO: do we need to know which sectionFace this QGIFace came from? QGIFace* newFace = drawFace(*fit,-1); //TODO: do we need to know which sectionFace this QGIFace came from?
newFace->setZValue(ZVALUE::SECTIONFACE); newFace->setZValue(ZVALUE::SECTIONFACE);
newFace->setFill(faceColor, Qt::SolidPattern); newFace->setFill(faceColor, Qt::SolidPattern);
newFace->setDrawEdges(false);
newFace->setPrettyNormal(); newFace->setPrettyNormal();
newFace->setAcceptHoverEvents(false); newFace->setAcceptHoverEvents(false);
newFace->setFlag(QGraphicsItem::ItemIsSelectable, false); newFace->setFlag(QGraphicsItem::ItemIsSelectable, false);