mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
GCS/OPMap-Make the wp editor show on wp doubleclick if it is
already open
This commit is contained in:
parent
68fba80301
commit
2fa4afd4a7
@ -33,7 +33,7 @@
|
||||
|
||||
// constructor
|
||||
opmap_edit_waypoint_dialog::opmap_edit_waypoint_dialog(QWidget *parent,QAbstractItemModel * model,QItemSelectionModel * selection) :
|
||||
QWidget(parent),model(model),itemSelection(selection),
|
||||
QWidget(parent,Qt::Window),model(model),itemSelection(selection),
|
||||
ui(new Ui::opmap_edit_waypoint_dialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@ -235,7 +235,14 @@ void opmap_edit_waypoint_dialog::pushButtonCancel_clicked()
|
||||
void opmap_edit_waypoint_dialog::editWaypoint(mapcontrol::WayPointItem *waypoint_item)
|
||||
{
|
||||
if (!waypoint_item) return;
|
||||
show();
|
||||
if(!isVisible())
|
||||
show();
|
||||
if(isMinimized())
|
||||
showNormal();
|
||||
if(!isActiveWindow())
|
||||
activateWindow();
|
||||
raise();
|
||||
setFocus(Qt::OtherFocusReason);
|
||||
mapper->setCurrentIndex(waypoint_item->Number());
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ OPMapGadgetWidget::OPMapGadgetWidget(QWidget *parent) : QWidget(parent)
|
||||
selectionModel=new QItemSelectionModel(model);
|
||||
mapProxy=new modelMapProxy(this,m_map,model,selectionModel);
|
||||
table->setModel(model,selectionModel);
|
||||
waypoint_edit_dialog=new opmap_edit_waypoint_dialog(NULL,model,selectionModel);
|
||||
waypoint_edit_dialog=new opmap_edit_waypoint_dialog(this,model,selectionModel);
|
||||
UAVProxy=new modelUavoProxy(this,model);
|
||||
connect(table,SIGNAL(sendPathPlanToUAV()),UAVProxy,SLOT(modelToObjects()));
|
||||
connect(table,SIGNAL(receivePathPlanFromUAV()),UAVProxy,SLOT(objectsToModel()));
|
||||
@ -1712,13 +1712,8 @@ void OPMapGadgetWidget::onAddWayPointAct_triggered(internals::PointLatLng coord)
|
||||
|
||||
if (m_map_mode != Normal_MapMode)
|
||||
return;
|
||||
|
||||
// m_map->WPCreate(coord, 0, "");
|
||||
float alt=15;
|
||||
mapProxy->createWayPoint(coord, alt);
|
||||
|
||||
//wp->map_wp_item->picture.load(QString::fromUtf8(":/opmap/images/waypoint_marker1.png"));
|
||||
//wp->map_wp_item->picture.load(QString::fromUtf8(":/opmap/images/waypoint_marker2.png"));
|
||||
mapProxy->createWayPoint(coord);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user