diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cpp | 7 | ||||
| -rw-r--r-- | src/sp-item-transform.cpp | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9f5a95ffe..079944af6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -584,11 +584,14 @@ static void _win32_set_inkscape_env(gchar const *exe) } else { printf("python not found\n\n"); }*/ - + // INKSCAPE_LOCALEDIR is needed by Python/Gettext gchar *localepath = g_build_filename(exe, PACKAGE_LOCALE_DIR, NULL); g_setenv("INKSCAPE_LOCALEDIR", localepath, TRUE); - + + // prevent "please insert disk" messages. fixes bug #950781 + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); + g_free(python); g_free(scripts); g_free(perl); diff --git a/src/sp-item-transform.cpp b/src/sp-item-transform.cpp index 88148c789..2d1dd8193 100644 --- a/src/sp-item-transform.cpp +++ b/src/sp-item-transform.cpp @@ -140,11 +140,11 @@ Geom::Affine get_scale_transform_for_uniform_stroke(Geom::Rect const &bbox_visua gdouble scale_y = 1; gdouble r1 = r0; - if (fabs(w0 - r0) < 1e-6) { // We have a vertical line at hand + if ((fabs(w0 - r0) < 1e-6) || w1 == 0) { // We have a vertical line at hand r1 = transform_stroke ? r0 * sqrt(h1/h0) : r0; scale_x = 1; scale_y = preserve ? h1/h0 : (h1 - r1)/(h0 - r0); - } else if (fabs(h0 - r0) < 1e-6) { // We have a horizontal line at hand + } else if ((fabs(h0 - r0) < 1e-6) || h1 == 0) { // We have a horizontal line at hand r1 = transform_stroke ? r0 * sqrt(w1/w0) : r0; scale_x = preserve ? w1/w0 : (w1 - r1)/(w0 - r0); scale_y = 1; |
