[TD]fix Leader attach point secondary views

This commit is contained in:
wandererfan
2020-03-22 18:39:48 -04:00
committed by WandererFan
parent f4e3d83788
commit 2d404558a7

View File

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