1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

Update station icon on map when My Position preference changes

This commit is contained in:
Jon Beniston
2022-03-21 10:14:35 +00:00
parent 4b82b919d3
commit 5ec2133782
8 changed files with 116 additions and 21 deletions
+4 -3
View File
@@ -231,7 +231,7 @@ void MapModel::update(const PipeEndPoint *sourcePipe, SWGSDRangel::SWGMapItem *s
remove(item);
// Need to call update, for it to be removed in 3D map
// Item is set to not be available from this point in time
// It will still be avialable if time is set in the past
// It will still be available if time is set in the past
item->update(swgMapItem);
}
else
@@ -508,11 +508,12 @@ QVariant MapModel::data(const QModelIndex &index, int role) const
else if (role == MapModel::mapTextRole)
{
// Create the text to go in the bubble next to the image
QString name = m_items[row]->m_label.isEmpty() ? m_items[row]->m_name : m_items[row]->m_label;
if (row == m_target)
{
AzEl *azEl = m_gui->getAzEl();
QString text = QString("%1<br>Az: %2%5 El: %3%5 Dist: %4 km")
.arg(m_selected[row] ? m_items[row]->m_text : m_items[row]->m_name)
.arg(m_selected[row] ? m_items[row]->m_text : name)
.arg(std::round(azEl->getAzimuth()))
.arg(std::round(azEl->getElevation()))
.arg(std::round(azEl->getDistance() / 1000.0))
@@ -525,7 +526,7 @@ QVariant MapModel::data(const QModelIndex &index, int role) const
}
else
{
return QVariant::fromValue(m_items[row]->m_name);
return QVariant::fromValue(name);
}
}
else if (role == MapModel::mapTextVisibleRole)