Changed signature of CreateMapObject.

This commit is contained in:
Alex Zolotarev 2016-03-03 09:59:02 +03:00 committed by Sergey Yershov
parent 2da971ddee
commit bd48f5485f
3 changed files with 5 additions and 5 deletions

View file

@ -2304,9 +2304,9 @@ bool Framework::ParseEditorDebugCommand(search::SearchParams const & params)
return false;
}
bool Framework::CreateMapObjectAtViewportCenter(uint32_t const featureType, osm::EditableMapObject & emo) const
bool Framework::CreateMapObject(m2::PointD const & mercator, uint32_t const featureType,
osm::EditableMapObject & emo) const
{
m2::PointD const mercator = GetViewportCenter();
MwmSet::MwmId const mwmId = m_model.GetIndex().GetMwmIdByCountryFile(
platform::CountryFile(m_infoGetter->GetRegionCountryId(mercator)));
if (!mwmId.IsAlive())

View file

@ -613,8 +613,8 @@ public:
/// @name Editor interface.
//@{
/// Initializes feature for Create Object UI.
/// @returns false in case when viewport center is in the ocean or mwm is not downloaded.
bool CreateMapObjectAtViewportCenter(uint32_t const featureType, osm::EditableMapObject & emo) const;
/// @returns false in case when coordinate is in the ocean or mwm is not downloaded.
bool CreateMapObject(m2::PointD const & mercator, uint32_t const featureType, osm::EditableMapObject & emo) const;
/// @returns false if feature is invalid or can't be edited.
bool GetEditableMapObject(FeatureID const & fid, osm:: EditableMapObject & emo) const;
osm::Editor::SaveResult SaveEditedMapObject(osm:: EditableMapObject const & emo) const;

View file

@ -489,7 +489,7 @@ void DrawWidget::CreateFeature()
if (dlg.exec() == QDialog::Accepted)
{
osm::EditableMapObject emo;
if (m_framework->CreateMapObjectAtViewportCenter(dlg.GetSelectedType(), emo))
if (m_framework->CreateMapObject(m_framework->GetViewportCenter(), dlg.GetSelectedType(), emo))
{
EditorDialog dlg(this, emo);
int const result = dlg.exec();