Commit e84942c7 authored by Andreas Brauchli's avatar Andreas Brauchli Committed by Jens Georg

map: Fix logic for show_position_markers

parent ec803d53
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment