Fix non-section faces in ViewSection

This commit is contained in:
WandererFan 2016-06-10 09:14:44 -04:00 committed by wmayer
parent 6cec1df189
commit d26fa56838
4 changed files with 14 additions and 6 deletions

View File

@ -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,

View File

@ -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);

View File

@ -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);
} }

View File

@ -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;