[libchamplain] Set zoom level only if champlain_zoom_level_zoom_to() is successful



commit 3093a500e3da24f9cc4a7f57b5474732c4a6517f
Author: JiÅ?í Techet <techet gmail com>
Date:   Sun Mar 14 14:46:03 2010 +0100

    Set zoom level only if champlain_zoom_level_zoom_to() is successful
    
    Signed-off-by: JiÅ?í Techet <techet gmail com>

 champlain/champlain-view.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index bd51ad2..ad7a48c 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -1980,13 +1980,13 @@ champlain_view_set_zoom_level (ChamplainView *view,
   if (zoom_level == priv->zoom_level || ZOOM_LEVEL_OUT_OF_RANGE(priv, zoom_level))
     return;
 
-  priv->zoom_level = zoom_level;
-
   champlain_view_stop_go_to (view);
 
   if (!champlain_zoom_level_zoom_to (priv->map_zoom_level, priv->map_source, zoom_level))
     return;
 
+  priv->zoom_level = zoom_level;
+
   DEBUG ("Zooming to %d", zoom_level);
 
   /* Fix to bug 575133: keep the lat,lon as it gets set to a wrong value



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]