Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions DroneTrackingPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,8 @@ Rectangle {

Image {
id: statusIcon
source: {
modelData.altitude > 0.05 ? "qrc:/resources/droneStatusSVG.svg" : "qrc:/resources/grounded.png"
}
source: mainPanel.isIndexSelected(index) ? "qrc:/resources/droneMapIconSelected.svg"
: (modelData.altitude > 0.05 ? "qrc:/resources/droneStatusSVG.svg" : "qrc:/resources/grounded.png")
sourceSize.width: GcsStyle.PanelStyle.statusIconSize
sourceSize.height: GcsStyle.PanelStyle.statusIconSize
Layout.alignment: Qt.AlignVCenter
Expand Down
13 changes: 12 additions & 1 deletion QmlMap.qml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ Item {

Image {
id: markerImage
source: "qrc:/resources/droneMapIconSVG.svg"
readonly property bool isCurrentDroneSelected: droneIsSelected(modelData)
source: isCurrentDroneSelected ? "qrc:/resources/droneMapIconSelected.svg" : "qrc:/resources/droneMapIconSVG.svg"
width: 100 // controlling w or h affects the whole image due to preserving the aspect fit
fillMode: Image.PreserveAspectFit
}
Expand Down Expand Up @@ -306,6 +307,16 @@ Item {
}
}

function droneIsSelected(modelData) {
for (let drone of selectedDrones) {
if (drone.latitude === modelData.latitude) {
return true
}
}
return false
}


onActiveDroneChanged: {
if (activeDrone === null) {
turnOffFollowDrone()
Expand Down
1 change: 1 addition & 0 deletions QtMap.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<file>fireSVG.svg</file>
<file>fireSVGDarkMode.svg</file>
<file>droneMapIconSVG.svg</file>
<file>droneMapIconSelected.svg</file>
</qresource>
<qresource prefix="/gcsStyle">
<file>panelStyle.qml</file>
Expand Down
94 changes: 33 additions & 61 deletions droneMapIconSVG.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions droneMapIconSelected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion extern/pybind11
Submodule pybind11 updated 211 files
2 changes: 1 addition & 1 deletion external/mavlink
Submodule mavlink updated 243 files
2 changes: 1 addition & 1 deletion third_party/c_library_v2
Submodule c_library_v2 updated 247 files