[shotwell] map: Fix logic for show_position_markers
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] map: Fix logic for show_position_markers
- Date: Sat, 23 Feb 2019 19:02:34 +0000 (UTC)
commit e84942c7a1d4e298a55455e5d0bcfc7e59f312e6
Author: Andreas Brauchli <a brauchli elementarea net>
Date: Thu Jun 23 09:52:14 2016 +0200
map: Fix logic for show_position_markers
src/MapWidget.vala | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/MapWidget.vala b/src/MapWidget.vala
index de936d23..cbc82a6f 100644
--- a/src/MapWidget.vala
+++ b/src/MapWidget.vala
@@ -124,6 +124,12 @@ private class MarkerGroupRaster : Object {
private Champlain.View map_view;
private Champlain.MarkerLayer marker_layer;
+ public bool is_empty {
+ get {
+ return position_markers.is_empty;
+ }
+ }
+
// position_markers_tree is a two-dimensional tree for grouping position
// markers indexed by x (outer tree) and y (inner tree) raster coordinates.
// It maps coordinates to the PositionMarker (DataViewMarker or MarkerGroup)
@@ -163,10 +169,6 @@ private class MarkerGroupRaster : Object {
return m;
}
- public bool has_markers() {
- return !position_markers.is_empty;
- }
-
public void rasterize_marker(PositionMarker position_marker, bool already_on_map=false) {
var data_view_position_marker = position_marker as DataViewPositionMarker;
var champlain_marker = position_marker.champlain_marker;
@@ -331,7 +333,7 @@ private class MapWidget : Gtk.Bin {
}
public void show_position_markers() {
- if (!marker_group_raster.has_markers()) {
+ if (!marker_group_raster.is_empty) {
if (map_view.get_zoom_level() < DEFAULT_ZOOM_LEVEL) {
map_view.set_zoom_level(DEFAULT_ZOOM_LEVEL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]