forked from organicmaps/organicmaps
Changed signature of CreateMapObject.
This commit is contained in:
parent
2da971ddee
commit
bd48f5485f
3 changed files with 5 additions and 5 deletions
|
@ -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())
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue