Fix non-section faces in ViewSection
This commit is contained in:
parent
6cec1df189
commit
d26fa56838
|
@ -226,6 +226,9 @@ App::DocumentObjectExecReturn *DrawViewSection::execute(void)
|
||||||
inputCenter,
|
inputCenter,
|
||||||
Scale.getValue());
|
Scale.getValue());
|
||||||
buildGeometryObject(mirroredShape,inputCenter);
|
buildGeometryObject(mirroredShape,inputCenter);
|
||||||
|
#if MOD_TECHDRAW_HANDLE_FACES
|
||||||
|
extractFaces();
|
||||||
|
#endif //#if MOD_TECHDRAW_HANDLE_FACES
|
||||||
|
|
||||||
TopoDS_Compound sectionCompound = findSectionPlaneIntersections(rawShape);
|
TopoDS_Compound sectionCompound = findSectionPlaneIntersections(rawShape);
|
||||||
TopoDS_Shape mirroredSection = TechDrawGeometry::mirrorShape(sectionCompound,
|
TopoDS_Shape mirroredSection = TechDrawGeometry::mirrorShape(sectionCompound,
|
||||||
|
|
|
@ -151,17 +151,20 @@ void QGIFace::setHighlighted(bool b)
|
||||||
|
|
||||||
void QGIFace::setFill(QColor c, Qt::BrushStyle s) {
|
void QGIFace::setFill(QColor c, Qt::BrushStyle s) {
|
||||||
m_colNormalFill = c;
|
m_colNormalFill = c;
|
||||||
m_styleCurr = s;
|
//m_styleCurr = s;
|
||||||
|
m_styleNormal = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QGIFace::setFill(QBrush b) {
|
void QGIFace::setFill(QBrush b) {
|
||||||
m_colNormalFill = b.color();
|
m_colNormalFill = b.color();
|
||||||
m_styleCurr = b.style();
|
//m_styleCurr = b.style();
|
||||||
|
m_styleNormal = b.style();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QGIFace::resetFill() {
|
void QGIFace::resetFill() {
|
||||||
m_colNormalFill = m_colDefFill;
|
m_colNormalFill = m_colDefFill;
|
||||||
m_styleCurr = m_styleDef;
|
//m_styleCurr = m_styleDef;
|
||||||
|
m_styleNormal = m_styleDef;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRectF QGIFace::boundingRect() const
|
QRectF QGIFace::boundingRect() const
|
||||||
|
@ -176,7 +179,7 @@ QPainterPath QGIFace::shape() const
|
||||||
|
|
||||||
void QGIFace::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) {
|
void QGIFace::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) {
|
||||||
QStyleOptionGraphicsItem myOption(*option);
|
QStyleOptionGraphicsItem myOption(*option);
|
||||||
myOption.state &= ~QStyle::State_Selected;
|
//myOption.state &= ~QStyle::State_Selected;
|
||||||
|
|
||||||
m_pen.setColor(m_colCurrent);
|
m_pen.setColor(m_colCurrent);
|
||||||
setPen(m_pen);
|
setPen(m_pen);
|
||||||
|
|
|
@ -79,6 +79,8 @@ 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->setPrettyNormal();
|
||||||
|
newFace->setAcceptHoverEvents(false);
|
||||||
newFace->setFlag(QGraphicsItem::ItemIsSelectable, false);
|
newFace->setFlag(QGraphicsItem::ItemIsSelectable, false);
|
||||||
newFace->setAcceptHoverEvents(false);
|
newFace->setAcceptHoverEvents(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@ namespace ZVALUE {
|
||||||
const int BACKGROUND = -999999;
|
const int BACKGROUND = -999999;
|
||||||
const int TEMPLATE = -1000;
|
const int TEMPLATE = -1000;
|
||||||
const int SVGTEMPLATE = -500;
|
const int SVGTEMPLATE = -500;
|
||||||
const int SECTIONFACE = 10;
|
const int FACE = 10;
|
||||||
const int FACE = 20;
|
const int SECTIONFACE = 20;
|
||||||
const int HATCH = 25;
|
const int HATCH = 25;
|
||||||
const int HIDEDGE = 27;
|
const int HIDEDGE = 27;
|
||||||
const int EDGE = 30;
|
const int EDGE = 30;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user