TechDraw: remove unneeded state from QGIPrimPath

This commit is contained in:
Benjamin Bræstrup Sayoc
2025-02-23 00:05:30 +01:00
parent ba2a377e7e
commit aead9ac8c7
15 changed files with 79 additions and 145 deletions

View File

@@ -51,7 +51,7 @@ QGIEdge::QGIEdge(int index) :
setFlag(QGraphicsItem::ItemIsFocusable, true); // to get key press events
setFlag(QGraphicsItem::ItemIsSelectable, true);
m_width = 1.0;
setWidth(1.0);
setCosmetic(isCosmetic);
setFill(Qt::NoBrush);
}
@@ -70,18 +70,18 @@ void QGIEdge::setCosmetic(bool state)
void QGIEdge::setHiddenEdge(bool b) {
isHiddenEdge = b;
if (b) {
m_styleCurrent = getHiddenStyle();
m_pen.setStyle(getHiddenStyle());
} else {
m_styleCurrent = Qt::SolidLine;
m_pen.setStyle(Qt::SolidLine);
}
}
void QGIEdge::setPrettyNormal() {
// Base::Console().Message("QGIE::setPrettyNormal()\n");
if (isHiddenEdge) {
m_colCurrent = getHiddenColor();
m_pen.setColor(getHiddenColor());
} else {
m_colCurrent = getNormalColor();
m_pen.setColor(getNormalColor());
}
//should call QGIPP::setPrettyNormal()?
}
@@ -137,9 +137,3 @@ void QGIEdge::setLinePen(QPen linePen)
{
m_pen = linePen;
}
void QGIEdge::setCurrentPen()
{
m_pen.setWidthF(m_width);
m_pen.setColor(m_colCurrent);
}