mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
Ground/OPMap: Fix compile error that PT made:
http://img93.imageshack.us/img93/8520/angrymonkey3uv.gif Also I'm not sure ZoomReal is correct, this just gets things running. There are some quirks with the OPMap scroll bar now that need to be addressed. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1731 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
1758f55f1c
commit
7a49f13540
@ -424,7 +424,7 @@ void OPMapGadgetWidget::contextMenuEvent(QContextMenuEvent *event)
|
|||||||
menu.addAction(zoomInAct);
|
menu.addAction(zoomInAct);
|
||||||
menu.addAction(zoomOutAct);
|
menu.addAction(zoomOutAct);
|
||||||
|
|
||||||
QMenu zoomSubMenu(tr("&Zoom ") + "(" + QString::number(m_map->Zoom()) + ")", this);
|
QMenu zoomSubMenu(tr("&Zoom ") + "(" + QString::number(m_map->ZoomReal()) + ")", this);
|
||||||
for (int i = 0; i < zoomAct.count(); i++)
|
for (int i = 0; i < zoomAct.count(); i++)
|
||||||
zoomSubMenu.addAction(zoomAct.at(i));
|
zoomSubMenu.addAction(zoomAct.at(i));
|
||||||
menu.addMenu(&zoomSubMenu);
|
menu.addMenu(&zoomSubMenu);
|
||||||
@ -819,13 +819,13 @@ void OPMapGadgetWidget::on_treeViewWaypoints_clicked(QModelIndex index)
|
|||||||
void OPMapGadgetWidget::zoomIn()
|
void OPMapGadgetWidget::zoomIn()
|
||||||
{
|
{
|
||||||
if (m_map)
|
if (m_map)
|
||||||
m_map->SetZoom(m_map->Zoom() + 1);
|
m_map->SetZoom(m_map->ZoomReal() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPMapGadgetWidget::zoomOut()
|
void OPMapGadgetWidget::zoomOut()
|
||||||
{
|
{
|
||||||
if (m_map)
|
if (m_map)
|
||||||
m_map->SetZoom(m_map->Zoom() - 1);
|
m_map->SetZoom(m_map->ZoomReal() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPMapGadgetWidget::setZoom(int value)
|
void OPMapGadgetWidget::setZoom(int value)
|
||||||
@ -1148,13 +1148,13 @@ void OPMapGadgetWidget::onShowUAVAct_toggled(bool show)
|
|||||||
void OPMapGadgetWidget::onGoZoomInAct_triggered()
|
void OPMapGadgetWidget::onGoZoomInAct_triggered()
|
||||||
{
|
{
|
||||||
if (m_map)
|
if (m_map)
|
||||||
setZoom(m_map->Zoom() + 1);
|
setZoom(m_map->ZoomReal() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPMapGadgetWidget::onGoZoomOutAct_triggered()
|
void OPMapGadgetWidget::onGoZoomOutAct_triggered()
|
||||||
{
|
{
|
||||||
if (m_map)
|
if (m_map)
|
||||||
setZoom(m_map->Zoom() - 1);
|
setZoom(m_map->ZoomReal() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPMapGadgetWidget::onZoomActGroup_triggered(QAction *action)
|
void OPMapGadgetWidget::onZoomActGroup_triggered(QAction *action)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user