Commit b3a59146 authored by Christoffer Ackelman's avatar Christoffer Ackelman

Fixed image_scale

parent d83a335b
......@@ -1875,7 +1875,7 @@ void FlowDrawQt::image_scale(float scale, flow_tImImage orig_im,
if (*im) {
delete ((QImage *) *im);
}
*((QImage * ) * im) = ((QImage *) orig_im)->scaled(width, height);
*im = new QImage(((QImage *) orig_im)->scaled(width, height));
}
int FlowDrawQt::image_load(const char *imagefile, float scale, float nav_scale,
......
......@@ -2401,9 +2401,8 @@ int GlowDrawQt::image_scale(int width, int height, glow_tImImage orig_im,
return 0;
}
QImage *im_old = (QImage * ) * im;
*((QImage * ) * im) = ((QImage * ) * im)->scaled(width, height);
delete im_old;
delete ((QImage *) *im);
*im = new QImage(((QImage *) orig_im)->scaled(width, height));
} else {
// Scale from orig_im
......@@ -2424,7 +2423,7 @@ int GlowDrawQt::image_scale(int width, int height, glow_tImImage orig_im,
if (*im) {
delete ((QImage * ) * im);
}
*((QImage * ) * im) = ((QImage *) orig_im)->scaled(width, height);
*im = new QImage(((QImage *) orig_im)->scaled(width, height));
}
}
return 1;
......
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