Skip to content

map-widget: marker edit improvements#793

Merged
dirkhh merged 3 commits intosubsurface:masterfrom
neolit123:marker-edit
Nov 9, 2017
Merged

map-widget: marker edit improvements#793
dirkhh merged 3 commits intosubsurface:masterfrom
neolit123:marker-edit

Conversation

@neolit123
Copy link
Copy Markdown
Member

Describe the pull request:

  • Bug fix
  • Functional change
  • New feature
  • Documentation change
  • Language translation

Pull request long description:

PATCH1:

When starting to edit a new dive location, create
a marker at the current map center instead of zooming
out and centering on the 0,0 coordinate.

This will help (and speed up) a lot the edition,
if the user needs to add numerous dive markers
at a specific location close to each other.

PATCH2:

This patch allows updating the location of map markers
while editing a dive site and updating the text in the
LocationInformationWidget in real-time.

Currently it is only possible to see the marker changes by
clicking 'Apply'.

The modification required the following changes:

  • add the MapWidget::updateCurrentDiveSiteCoordinatesToMap() slot
    and call it each time the GPS text updates
  • separate the updateCurrentDiveSiteCoordinates(FromMap/ToMap) logic
    by having the FromMap/ToMap suffix to method names
  • make MapWidgetHelper::updateCurrentDiveSiteCoordinatesToMap()
    call a new MapLocationModel::updateMapLocationCoordinates()
    method, which updates selected location coordinates and the model
  • add MapLocation::setCoordinateNoEmit() that does not emit
    a signal when updating a coordinate

Changes made:

see list above

Related issues:

Fixes #754

Additional information:

none

Mentions:

@dirkhh @janmulder @sfuchs79

When starting to edit a new dive location, create
a marker at the current map center instead of zooming
out and centering on the 0,0 coordinate.

This will help (and speed up) a lot the edition,
if the user needs to add numerous dive markers
at a specific location close to each other.

refs subsurface#754

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This patch allows updating the location of map markers
while editing a dive site and updating the text in the
LocationInformationWidget in real-time.

Currently it is only possible to see the marker changes by
clicking 'Apply'.

The modification required the following changes:
- add the MapWidget::updateCurrentDiveSiteCoordinatesToMap() slot
and call it each time the GPS text updates
- separate the updateCurrentDiveSiteCoordinates(FromMap/ToMap) logic
by having the FromMap/ToMap suffix to method names
- make MapWidgetHelper::updateCurrentDiveSiteCoordinatesToMap()
call a new MapLocationModel::updateMapLocationCoordinates()
method, which updates selected location coordinates and the model
- add MapLocation::setCoordinateNoEmit() that does not emit
a signal when updating a coordinate

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
@dirkhh
Copy link
Copy Markdown
Collaborator

dirkhh commented Nov 9, 2017

Can I ask you to add a patch # 3 that edits the ReleaseNotes? :-)

@neolit123
Copy link
Copy Markdown
Member Author

@dirkhh sure

@neolit123
Copy link
Copy Markdown
Member Author

hope i got the release notes right.

@dirkhh
Copy link
Copy Markdown
Collaborator

dirkhh commented Nov 9, 2017

hope i got the release notes right.

Hehe, no you didn't. Look at the structure of the file. Your change should go below the Some of the changes since _Subsurface_ 4.7.2 line - and be formatted like the rest there (i.e. with two leading spaces in continuation lines).

Thanks for making my life easier!

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
@neolit123
Copy link
Copy Markdown
Member Author

think i got it this time.

@dirkhh dirkhh merged commit 76f5950 into subsurface:master Nov 9, 2017
@neolit123 neolit123 deleted the marker-edit branch November 10, 2017 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

map-widget: improvements for editing markers

2 participants