After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733617 - Don't deselect all markers when a marker got deselected
Don't deselect all markers when a marker got deselected
Status: RESOLVED FIXED
Product: libchamplain
Classification: Core
Component: markers
unspecified
Other All
: Normal major
: ---
Assigned To: libchamplain-maint
libchamplain-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-23 17:27 UTC by Damián Nohales
Modified: 2014-07-27 16:20 UTC
See Also:
GNOME target: ---
GNOME version: 3.13/3.14


Attachments
Don't deselect all markers when a marker got deselected (1.03 KB, patch)
2014-07-23 17:27 UTC, Damián Nohales
none Details | Review

Description Damián Nohales 2014-07-23 17:27:07 UTC
This causes all markers deselection when a deselected marker "selected"
property is resetted to FALSE.

Thanks!
Comment 1 Damián Nohales 2014-07-23 17:27:11 UTC
Created attachment 281495 [details] [review]
Don't deselect all markers when a marker got deselected

This causes all markers deselection when a deselected marker "selected"
property is resetted to FALSE.
Comment 2 Jiri Techet 2014-07-25 20:37:19 UTC
Hi Damian, could you please describe in more detail what the problem is - I don't completely understand. When using CHAMPLAIN_SELECTION_SINGLE, at most one marker is selected so I don't quite understand the "all markers deselection" part ("all" should be at most 1 with SINGLE). If you need multiple markers selected, you can use the CHAMPLAIN_SELECTION_MULTIPLE mode.
Comment 3 Damián Nohales 2014-07-25 21:40:18 UTC
The problem occurs when a marker which has it "selected" property in FALSE is deselected, I mean, application calls "champlain_marker_set_selected(marker, FALSE)" in an already deselected marker.

This causes that any selected marker becomes deselected just because we "deselect an already deselected marker".

To illustrate it:


I have:
marker1->selected = true
marker2->selected = false
marker3->selected = false

Then I execute:
champlain_marker_set_selected(marker2, FALSE);

Then I have
marker1->selected = false
marker2->selected = false
marker3->selected = false

I'm expecting the same as above:
marker1->selected = true
marker2->selected = false
marker3->selected = false


I hope I have explained correctly :)
Comment 4 Jiri Techet 2014-07-27 16:20:11 UTC
Thanks, I understand now. The patch looks fine so I've just pushed it to master.