From 72cbff918fdad51e3cdd5d97b52a790ddaca265f 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 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/qgsdxfexportdialog.cpp b/src/app/qgsdxfexportdialog.cpp index e6a32d239f7..8f1152d3b9f 100644 --- a/src/app/qgsdxfexportdialog.cpp +++ b/src/app/qgsdxfexportdialog.cpp @@ -528,11 +528,13 @@ QList< QPair > QgsDxfExportDialog::layers() const double QgsDxfExportDialog::symbologyScale() const { - double scale = 1 / mScaleWidget->scale(); - if ( qgsDoubleNear( scale, 0.0 ) ) - { + 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; }