Commit ef14ca5f7448366dde169f3648e6b0ce4dc21b25

do not emit a notify for lat and lon if the change is too small
NEWS
(2 / 0)
  
2424 Beaudoin)
2525* 606393: The display of tiles looks very programmatic, they now load in spiral
2626 order (Jason Woofenden)
27* Limit the number of times notify::latitude and notify::longitude are emited
28 (Pierre-Luc Beaudoin)
2729
2830libchamplain 0.4.3 (2010-01-09)
2931===============================
champlain/champlain-view.c
(11 / 4)
  
285285 gfloat y)
286286{
287287 ChamplainViewPrivate *priv = view->priv;
288 gfloat lat, lon;
288289
289290 ChamplainFloatPoint old_anchor;
290291
318318 update_scale (view);
319319
320320 view_update_polygons (view);
321 priv->longitude = viewport_get_current_longitude (priv);
322 priv->latitude = viewport_get_current_latitude (priv);
321 lon = viewport_get_current_longitude (priv);
322 lat = viewport_get_current_latitude (priv);
323323
324 g_object_notify (G_OBJECT (view), "longitude");
325 g_object_notify (G_OBJECT (view), "latitude");
324 priv->longitude = lon;
325 priv->latitude = lat;
326
327 if (fabs (priv->longitude - lon) > 0.001)
328 g_object_notify (G_OBJECT (view), "longitude");
329
330 if (fabs (priv->latitude - lat) > 0.001)
331 g_object_notify (G_OBJECT (view), "latitude");
326332}
327333
328334static void

Comments

Add a new comment:

Login or create an account to post a comment

Add your comment