Skip to content

Commit

Permalink
can't assign nullptr to a QPixmap
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 30, 2017
1 parent 303f088 commit 64d0eb9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Mod/TechDraw/Gui/QGIFace.cpp
Expand Up @@ -78,7 +78,7 @@ QGIFace::QGIFace(int index) :
setLineWeight(0.5); //0 = cosmetic

setPrettyNormal();
m_texture = nullptr; //empty texture
m_texture = QPixmap(); //empty texture

m_svg = new QGCustomSvg();

Expand All @@ -101,7 +101,7 @@ void QGIFace::draw()
if (isHatched()) {
if (m_mode == GeomHatchFill) { //crosshatch
if (!m_geomHatchPaths.empty()) { //surrogate for LineSets.empty
m_brush.setTexture(nullptr);
m_brush.setTexture(QPixmap());
m_fillStyle = m_styleDef;
m_styleNormal = m_fillStyle;
int pathNo = 0;
Expand All @@ -121,7 +121,7 @@ void QGIFace::draw()
QString ext = hfi.suffix();
if (ext.toUpper() == QString::fromUtf8("SVG")) {
setFillMode(SvgFill);
m_brush.setTexture(nullptr);
m_brush.setTexture(QPixmap());
m_fillStyle = m_styleDef;
m_styleNormal = m_fillStyle;
loadSvgHatch(m_fileSpec);
Expand Down Expand Up @@ -150,22 +150,22 @@ void QGIFace::setPrettyNormal() {
m_brush.setTexture(m_texture);
} else {
m_fillStyle = m_styleNormal;
m_brush.setTexture(nullptr);
m_brush.setTexture(QPixmap());
m_brush.setStyle(m_fillStyle);
m_fillColor = m_colNormalFill;
}
QGIPrimPath::setPrettyNormal();
}

void QGIFace::setPrettyPre() {
m_brush.setTexture(nullptr);
m_brush.setTexture(QPixmap());
m_fillStyle = m_styleSelect;
m_fillColor = getPreColor();
QGIPrimPath::setPrettyPre();
}

void QGIFace::setPrettySel() {
m_brush.setTexture(nullptr);
m_brush.setTexture(QPixmap());
m_fillStyle = m_styleSelect;
m_fillColor = getSelectColor();
QGIPrimPath::setPrettySel();
Expand Down

0 comments on commit 64d0eb9

Please sign in to comment.