[TechDraw] Reimplement Leader Line parent linking

This commit is contained in:
pavltom
2024-03-04 15:35:06 +01:00
parent 17835ea7c1
commit a9b77de0be
10 changed files with 7 additions and 111 deletions

View File

@@ -52,8 +52,7 @@ using namespace TechDraw;
//**************************************************************
QGILeaderLine::QGILeaderLine()
: m_parentItem(nullptr),
m_lineColor(Qt::black),
: m_lineColor(Qt::black),
m_lineStyle(Qt::SolidLine),
m_hasHover(false),
m_saveX(0.0),
@@ -169,22 +168,6 @@ void QGILeaderLine::hoverLeaveEvent(QGraphicsSceneHoverEvent* event)
QGIView::hoverLeaveEvent(event);
}
void QGILeaderLine::onSourceChange(TechDraw::DrawView* newParent)
{
// Base::Console().Message("QGILL::onSoureChange(%s)\n", newParent->getNameInDocument());
std::string parentName = newParent->getNameInDocument();
QGIView* qgiParent = getQGIVByName(parentName);
if (qgiParent) {
m_parentItem = qgiParent;
setParentItem(m_parentItem);
draw();
}
else {
Base::Console().Warning("QGILL::onSourceChange - new parent %s has no QGIView\n",
parentName.c_str());
}
}
void QGILeaderLine::setNormalColorAll()
{
// Base::Console().Message("QGILL::setNormalColorAll - normal color: %s\n", qPrintable(getNormalColor().name()));