Skip to content

Commit

Permalink
[TD]fix Leader attach point secondary views
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan committed Mar 23, 2020
1 parent c32c9d5 commit 3e00de2
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/Mod/TechDraw/Gui/TaskLeaderLine.cpp
Expand Up @@ -609,26 +609,14 @@ void TaskLeaderLine::startTracker(void)

void TaskLeaderLine::onTrackerFinished(std::vector<QPointF> pts, QGIView* qgParent)
{
//in this case, we already know who the parent is. We don't need QGTracker to tell us.
(void) qgParent;
// Base::Console().Message("TTL::onTrackerFinished() - parent: %X\n",qgParent);
if (pts.empty()) {
Base::Console().Error("TaskLeaderLine - no points available\n");
return;
}

if (qgParent == nullptr) {
//do something;
m_qgParent = findParentQGIV();
} else {
QGIView* qgiv = dynamic_cast<QGIView*>(qgParent);
if (qgiv != nullptr) {
m_qgParent = qgiv;
} else {
Base::Console().Message("TTL::onTrackerFinished - can't find parent graphic!\n");
//blow up!?
throw Base::RuntimeError("TaskLeaderLine - can not find parent graphic");
}
}

if (m_qgParent != nullptr) {
double scale = m_qgParent->getScale();
QPointF mapped = m_qgParent->mapFromScene(pts.front()) / scale;
Expand Down

0 comments on commit 3e00de2

Please sign in to comment.