From 21325a2b4da0afe107d3c4af4e4c295cd26726f4 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Thu, 18 Aug 2016 18:17:37 +0200 Subject: [PATCH] dxf export: avoid symbology scale 0 (fixes #14138) (cherry picked from commit 0a07fee15297e18a73b63f194f5aeecffd76800c) --- src/app/qgsdxfexportdialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/qgsdxfexportdialog.cpp b/src/app/qgsdxfexportdialog.cpp index b425a94df3c8..28f4fa7ccd8b 100644 --- a/src/app/qgsdxfexportdialog.cpp +++ b/src/app/qgsdxfexportdialog.cpp @@ -526,11 +526,13 @@ QList< QPair > QgsDxfExportDialog::layers() const double QgsDxfExportDialog::symbologyScale() const { - double scale = 1 / mScaleWidget->scale(); + if ( qgsDoubleNear( mScaleWidget->scale(), 0.0 ) ) + return 1.0; + + double scale = 1.0 / mScaleWidget->scale(); if ( qgsDoubleNear( scale, 0.0 ) ) - { return 1.0; - } + return scale; }