Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libshumate for openSUSE:Factory 
checked in at 2023-11-05 12:18:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libshumate (Old)
 and      /work/SRC/openSUSE:Factory/.libshumate.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libshumate"

Sun Nov  5 12:18:34 2023 rev:10 rq:1123047 version:1.1.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libshumate/libshumate.changes    2023-10-24 
20:07:24.870468182 +0200
+++ /work/SRC/openSUSE:Factory/.libshumate.new.17445/libshumate.changes 
2023-11-05 12:18:42.724956977 +0100
@@ -1,0 +2,7 @@
+Thu Nov  2 09:03:18 UTC 2023 - Bjørn Lie <bjorn....@gmail.com>
+
+- Update to version 1.1.2:
+  + Fix using overlay map layers with different tile sizes than the
+    reference source.
+
+-------------------------------------------------------------------

Old:
----
  libshumate-1.1.1.obscpio

New:
----
  libshumate-1.1.2.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libshumate.spec ++++++
--- /var/tmp/diff_new_pack.5ixo75/_old  2023-11-05 12:18:43.604989260 +0100
+++ /var/tmp/diff_new_pack.5ixo75/_new  2023-11-05 12:18:43.604989260 +0100
@@ -22,7 +22,7 @@
 %bcond_with profiling
 
 Name:           libshumate
-Version:        1.1.1
+Version:        1.1.2
 Release:        0
 Summary:        C library providing a GtkWidget to display maps
 License:        LGPL-2.1-or-later

++++++ _service ++++++
--- /var/tmp/diff_new_pack.5ixo75/_old  2023-11-05 12:18:43.624989993 +0100
+++ /var/tmp/diff_new_pack.5ixo75/_new  2023-11-05 12:18:43.628990141 +0100
@@ -4,7 +4,7 @@
     <param name="url">https://gitlab.gnome.org/GNOME/libshumate.git</param>
     <param name="scm">git</param>
     <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
-    <param name="revision">refs/tags/1.1.1</param>
+    <param name="revision">refs/tags/1.1.2</param>
     <param name="versionrewrite-pattern">(.*)\+0</param>
     <param name="versionrewrite-replacement">\1</param>
   </service>

++++++ libshumate-1.1.1.obscpio -> libshumate-1.1.2.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.1.1/NEWS new/libshumate-1.1.2/NEWS
--- old/libshumate-1.1.1/NEWS   2023-10-21 22:26:34.000000000 +0200
+++ new/libshumate-1.1.2/NEWS   2023-11-01 21:08:56.000000000 +0100
@@ -1,4 +1,10 @@
 =====================
+Version 1.1.2
+=====================
+ - Fix using overlay map layers with different tile sizes than the reference
+   source
+
+=====================
 Version 1.1.1
 =====================
  - Fix null reference map source, avoid critical log message when setting
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.1.1/meson.build 
new/libshumate-1.1.2/meson.build
--- old/libshumate-1.1.1/meson.build    2023-10-21 22:26:34.000000000 +0200
+++ new/libshumate-1.1.2/meson.build    2023-11-01 21:08:56.000000000 +0100
@@ -1,6 +1,6 @@
 project(
   'libshumate', 'c',
-  version: '1.1.1',
+  version: '1.1.2',
   license: 'LGPLv2.1+',
   meson_version: '>= 0.53.0',
   default_options: [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.1.1/shumate/shumate-map-layer.c 
new/libshumate-1.1.2/shumate/shumate-map-layer.c
--- old/libshumate-1.1.1/shumate/shumate-map-layer.c    2023-10-21 
22:26:34.000000000 +0200
+++ new/libshumate-1.1.2/shumate/shumate-map-layer.c    2023-11-01 
21:08:56.000000000 +0100
@@ -219,6 +219,15 @@
   g_signal_handlers_disconnect_by_func (tile, on_tile_notify_state, self);
 }
 
+static double
+get_effective_zoom_level (ShumateMapLayer *self)
+{
+  double zoom_level = shumate_viewport_get_zoom_level 
(shumate_layer_get_viewport (SHUMATE_LAYER (self)));
+  double our_tile_size = shumate_map_source_get_tile_size (self->map_source);
+  double reference_tile_size = shumate_map_source_get_tile_size 
(shumate_viewport_get_reference_map_source (shumate_layer_get_viewport 
(SHUMATE_LAYER (self))));
+  return log2 (reference_tile_size / our_tile_size) + zoom_level;
+}
+
 static gboolean
 defer_tick_callback (GtkWidget     *widget,
                      GdkFrameClock *frame_clock,
@@ -240,7 +249,7 @@
 
   ShumateViewport *viewport = shumate_layer_get_viewport (SHUMATE_LAYER 
(self));
   ShumateMapSource *map_source = self->map_source;
-  double zoom_level = shumate_viewport_get_zoom_level (viewport);
+  double zoom_level = get_effective_zoom_level (self);
   double tile_size = shumate_map_source_get_tile_size_at_zoom (map_source, 
zoom_level);
   double map_height = shumate_map_source_get_row_count (map_source, 
zoom_level) * tile_size;
   double map_width = shumate_map_source_get_column_count (map_source, 
zoom_level) * tile_size;
@@ -279,7 +288,7 @@
 
   self->defer_latitude_y = latitude_y / map_height;
   self->defer_longitude_x = longitude_x / map_width;
-  self->defer_zoom_level = shumate_viewport_get_zoom_level (viewport);
+  self->defer_zoom_level = zoom_level;
   self->defer_frame_time = frame_time;
 
   return self->deferring;
@@ -298,7 +307,7 @@
   int height = gtk_widget_get_height (GTK_WIDGET (self));
   ShumateViewport *viewport = shumate_layer_get_viewport (SHUMATE_LAYER 
(self));
   int tile_size = shumate_map_source_get_tile_size (self->map_source);
-  int zoom_level = shumate_viewport_get_zoom_level (viewport);
+  int zoom_level = (int)floor (get_effective_zoom_level (self));
   double latitude = shumate_location_get_latitude (SHUMATE_LOCATION 
(viewport));
   double longitude = shumate_location_get_longitude (SHUMATE_LOCATION 
(viewport));
   int latitude_y = shumate_map_source_get_y (self->map_source, zoom_level, 
latitude);
@@ -581,28 +590,11 @@
                            int            *minimum_baseline,
                            int            *natural_baseline)
 {
-  ShumateMapLayer *self = SHUMATE_MAP_LAYER (widget);
-
   if (minimum)
     *minimum = 0;
 
   if (natural)
-    {
-      ShumateViewport *viewport;
-      double tile_size;
-      guint zoom_level;
-      guint count;
-
-      viewport = shumate_layer_get_viewport (SHUMATE_LAYER (self));
-      zoom_level = shumate_viewport_get_zoom_level (viewport);
-      tile_size = shumate_map_source_get_tile_size_at_zoom (self->map_source, 
zoom_level);
-      if (orientation == GTK_ORIENTATION_HORIZONTAL)
-        count = shumate_map_source_get_column_count (self->map_source, 
zoom_level);
-      else
-        count = shumate_map_source_get_row_count (self->map_source, 
zoom_level);
-
-      *natural = count * tile_size;
-    }
+    *natural = 0;
 }
 
 static double
@@ -618,7 +610,7 @@
 {
   ShumateMapLayer *self = SHUMATE_MAP_LAYER (widget);
   ShumateViewport *viewport = shumate_layer_get_viewport (SHUMATE_LAYER 
(self));
-  double zoom_level = shumate_viewport_get_zoom_level (viewport);
+  double zoom_level = get_effective_zoom_level (self);
   int width = gtk_widget_get_width (GTK_WIDGET (self));
   int height = gtk_widget_get_height (GTK_WIDGET (self));
   double rotation = shumate_viewport_get_rotation (viewport);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libshumate-1.1.1/shumate/vector/shumate-vector-symbol-container.c 
new/libshumate-1.1.2/shumate/vector/shumate-vector-symbol-container.c
--- old/libshumate-1.1.1/shumate/vector/shumate-vector-symbol-container.c       
2023-10-21 22:26:34.000000000 +0200
+++ new/libshumate-1.1.2/shumate/vector/shumate-vector-symbol-container.c       
2023-11-01 21:08:56.000000000 +0100
@@ -184,6 +184,15 @@
     }
 }
 
+static double
+get_effective_zoom_level (ShumateMapSource *map_source, ShumateViewport 
*viewport)
+{
+  double zoom_level = shumate_viewport_get_zoom_level (viewport);
+  double our_tile_size = shumate_map_source_get_tile_size (map_source);
+  double reference_tile_size = shumate_map_source_get_tile_size 
(shumate_viewport_get_reference_map_source (viewport));
+  return log2 (reference_tile_size / our_tile_size) + zoom_level;
+}
+
 static void
 rotate_around_origin (double *x,
                       double *y,
@@ -234,7 +243,7 @@
   GtkAllocation alloc;
   double tile_size = shumate_map_source_get_tile_size (self->map_source);
   ShumateViewport *viewport = shumate_layer_get_viewport (SHUMATE_LAYER 
(self));
-  double zoom_level = shumate_viewport_get_zoom_level (viewport);
+  double zoom_level = get_effective_zoom_level (self->map_source, viewport);
   double rotation = shumate_viewport_get_rotation (viewport);
   double center_x = shumate_map_source_get_x (self->map_source, zoom_level, 
shumate_location_get_longitude (SHUMATE_LOCATION (viewport)));
   double center_y = shumate_map_source_get_y (self->map_source, zoom_level, 
shumate_location_get_latitude (SHUMATE_LOCATION (viewport)));

++++++ libshumate.obsinfo ++++++
--- /var/tmp/diff_new_pack.5ixo75/_old  2023-11-05 12:18:43.804996597 +0100
+++ /var/tmp/diff_new_pack.5ixo75/_new  2023-11-05 12:18:43.804996597 +0100
@@ -1,5 +1,5 @@
 name: libshumate
-version: 1.1.1
-mtime: 1697919994
-commit: 07ca1e45c3deea741ef3f46717adf8949e06ec03
+version: 1.1.2
+mtime: 1698869336
+commit: eeb257ab8cfca9133ec2e7da739d3ce815be7067
 

Reply via email to