forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
ff9fdf07b9
commit
7bf18c191e
3 changed files with 17 additions and 22 deletions
|
@ -101,6 +101,7 @@
|
|||
|
||||
#include "std/algorithm.hpp"
|
||||
#include "std/bind.hpp"
|
||||
#include "std/map.hpp"
|
||||
#include "std/target_os.hpp"
|
||||
|
||||
#include "api/internal/c/api-client-internals.h"
|
||||
|
@ -3344,6 +3345,9 @@ void Framework::VisualizeCityRoadsInRect(m2::RectD const & rect)
|
|||
size_t counter = 0;
|
||||
GetDataSource().ForEachInRect(
|
||||
[this, &rect, &cityRoads, &counter](FeatureType & ft) {
|
||||
if (ft.GetFeatureType() != feature::GEOM_LINE)
|
||||
return;
|
||||
|
||||
auto const & mwmId = ft.GetID().m_mwmId;
|
||||
auto const it = cityRoads.find(mwmId);
|
||||
if (it == cityRoads.cend())
|
||||
|
|
|
@ -237,7 +237,7 @@ void DrawWidget::mouseReleaseEvent(QMouseEvent * e)
|
|||
{
|
||||
CHECK(!m_cityBoundariesSelectionMode, ());
|
||||
CHECK(!m_cityRoadsSelectionMode, ());
|
||||
m_framework.VisualizeCityRoadsInRect(rect);
|
||||
m_framework.VisualizeRoadsInRect(rect);
|
||||
}
|
||||
else if (m_cityBoundariesSelectionMode)
|
||||
{
|
||||
|
|
|
@ -563,42 +563,33 @@ void MainWindow::OnCreateFeatureClicked()
|
|||
|
||||
void MainWindow::OnSwitchSelectionMode()
|
||||
{
|
||||
if (m_selectionCityBoundariesMode->isChecked() || m_selectionCityRoadsMode->isChecked())
|
||||
{
|
||||
m_selectionCityBoundariesMode->setChecked(false);
|
||||
m_pDrawWidget->SetCityBoundariesSelectionMode(false);
|
||||
m_selectionCityBoundariesMode->setChecked(false);
|
||||
m_pDrawWidget->SetCityBoundariesSelectionMode(false);
|
||||
|
||||
m_selectionCityRoadsMode->setChecked(false);
|
||||
m_pDrawWidget->SetCityRoadsSelectionMode(false);
|
||||
}
|
||||
m_selectionCityRoadsMode->setChecked(false);
|
||||
m_pDrawWidget->SetCityRoadsSelectionMode(false);
|
||||
|
||||
m_pDrawWidget->SetSelectionMode(m_selectionMode->isChecked());
|
||||
}
|
||||
|
||||
void MainWindow::OnSwitchCityBoundariesSelectionMode()
|
||||
{
|
||||
if (m_selectionMode->isChecked() || m_selectionCityRoadsMode->isChecked())
|
||||
{
|
||||
m_selectionMode->setChecked(false);
|
||||
m_pDrawWidget->SetSelectionMode(false);
|
||||
m_selectionMode->setChecked(false);
|
||||
m_pDrawWidget->SetSelectionMode(false);
|
||||
|
||||
m_selectionCityRoadsMode->setChecked(false);
|
||||
m_pDrawWidget->SetCityRoadsSelectionMode(false);
|
||||
}
|
||||
m_selectionCityRoadsMode->setChecked(false);
|
||||
m_pDrawWidget->SetCityRoadsSelectionMode(false);
|
||||
|
||||
m_pDrawWidget->SetCityBoundariesSelectionMode(m_selectionCityBoundariesMode->isChecked());
|
||||
}
|
||||
|
||||
void MainWindow::OnSwitchCityRoadsSelectionMode()
|
||||
{
|
||||
if (m_selectionMode->isChecked() || m_selectionCityBoundariesMode->isChecked())
|
||||
{
|
||||
m_selectionMode->setChecked(false);
|
||||
m_pDrawWidget->SetSelectionMode(false);
|
||||
m_selectionMode->setChecked(false);
|
||||
m_pDrawWidget->SetSelectionMode(false);
|
||||
|
||||
m_selectionCityBoundariesMode->setChecked(false);
|
||||
m_pDrawWidget->SetCityBoundariesSelectionMode(false);
|
||||
}
|
||||
m_selectionCityBoundariesMode->setChecked(false);
|
||||
m_pDrawWidget->SetCityBoundariesSelectionMode(false);
|
||||
|
||||
m_pDrawWidget->SetCityRoadsSelectionMode(m_selectionCityRoadsMode->isChecked());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue