Skip to content

Commit 6f5ac0f

Browse files
authored
Merge pull request #76 from BCLab-UNM/hotfix-popout-map-waypoints
Hotfix popout map waypoints
2 parents f1a1845 + 0ac9c28 commit 6f5ac0f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/rqt_rover_gui/src/MapFrame.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ void MapFrame::createPopoutWindow( MapData * map_data )
7474

7575
connect(this, SIGNAL(delayedUpdate()), popout_mapframe, SLOT(update()), Qt::QueuedConnection);
7676

77-
// Forward info messages from the popout framt to the rover gui via the signal in this parent map frame
77+
78+
// Forward signals from the popout map to the parent map for handling. We only need to forward signals
79+
// triggered by the popout object - such as mouse clicks
7880
connect(popout_mapframe, SIGNAL(sendInfoLogMessage(QString)), this, SIGNAL(sendInfoLogMessage(QString)));
81+
connect(popout_mapframe, SIGNAL(sendWaypointCmd(WaypointCmd, int, float, float)), this, SIGNAL(sendWaypointCmd(WaypointCmd, int, float, float)));
82+
7983
}
8084

8185
void MapFrame::paintEvent(QPaintEvent* event) {
@@ -881,6 +885,12 @@ void MapFrame::receiveWaypointReached(int waypoint_id)
881885
void MapFrame::receiveCurrentRoverName( QString rover_name )
882886
{
883887
this->rover_currently_selected = rover_name.toStdString();
888+
889+
// Forward the change to the popout map if it exists
890+
if (popout_mapframe)
891+
{
892+
popout_mapframe->receiveCurrentRoverName(rover_name);
893+
}
884894
}
885895

886896
MapFrame::~MapFrame()

0 commit comments

Comments
 (0)