Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jcupitt/vipsdisp
Browse files Browse the repository at this point in the history
  • Loading branch information
jcupitt committed Oct 11, 2024
2 parents c27251a + 5638e70 commit 49eda11
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
project(
'vipsdisp', 'c',
project('vipsdisp', 'c',
version: '3.1.0',
license: 'MIT',
meson_version: '>=0.56',
default_options: [
'c_std=c11',
# glib uses this, so we do too
'c_std=gnu11',
# do a release (optimised) build by default
'buildtype=release',
# turn off asserts etc. in release mode
Expand Down
8 changes: 5 additions & 3 deletions src/imageui.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ imageui_set_property(GObject *object,
{
Imageui *imageui = (Imageui *) object;

double zoom;

#ifdef DEBUG_VERBOSE
{
g_autofree char *str = g_strdup_value_contents(value);
Expand All @@ -179,7 +181,7 @@ imageui_set_property(GObject *object,
case PROP_ZOOM:
/* Scale by the zoom factor (SVG etc. zoom) we picked on load.
*/
double zoom = g_value_get_double(value);
zoom = g_value_get_double(value);
zoom /= imageui->tilesource->zoom;

g_object_set(imageui->imagedisplay,
Expand Down Expand Up @@ -209,6 +211,8 @@ imageui_get_property(GObject *object,
{
Imageui *imageui = IMAGEUI(object);

double zoom;

switch (prop_id) {
case PROP_TILESOURCE:
g_value_set_object(value, imageui->tilesource);
Expand All @@ -220,8 +224,6 @@ imageui_get_property(GObject *object,
break;

case PROP_ZOOM:
double zoom;

g_object_get(imageui->imagedisplay,
"zoom", &zoom,
NULL);
Expand Down
3 changes: 2 additions & 1 deletion src/tilesource.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ tilesource_set_property(GObject *object,
int i;
double d;
gboolean b;
TilesourceMode mode;

#ifdef DEBUG
{
Expand All @@ -794,7 +795,7 @@ tilesource_set_property(GObject *object,

switch (prop_id) {
case PROP_MODE:
TilesourceMode mode = g_value_get_enum(value);
mode = g_value_get_enum(value);
if (mode >= 0 &&
mode < TILESOURCE_MODE_LAST &&
tilesource->mode != mode) {
Expand Down

0 comments on commit 49eda11

Please sign in to comment.