Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix loading of rotation in 3d point symbols in GUI (fixes #31410) (#3…
…1416)

The conversion to Euler angles may give angles in range (-180, 180)
but spin boxes in GUI only expect range (0, 360)
  • Loading branch information
wonder-sk committed Sep 4, 2019
1 parent 282d88b commit 3e454dc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/3d/qgspoint3dsymbolwidget.cpp
Expand Up @@ -16,6 +16,7 @@
#include "qgspoint3dsymbolwidget.h"
#include <QFileDialog>
#include <QMessageBox>
#include "qgslayoututils.h"
#include "qgsreadwritecontext.h"
#include "qgssettings.h"

Expand Down Expand Up @@ -183,9 +184,9 @@ void QgsPoint3DSymbolWidget::setSymbol( const QgsPoint3DSymbol &symbol )
spinSX->setValue( sx );
spinSY->setValue( sy );
spinSZ->setValue( sz );
spinRX->setValue( rot.x() );
spinRY->setValue( rot.y() );
spinRZ->setValue( rot.z() );
spinRX->setValue( QgsLayoutUtils::normalizedAngle( rot.x() ) );
spinRY->setValue( QgsLayoutUtils::normalizedAngle( rot.y() ) );
spinRZ->setValue( QgsLayoutUtils::normalizedAngle( rot.z() ) );
}

QgsPoint3DSymbol QgsPoint3DSymbolWidget::symbol() const
Expand Down

0 comments on commit 3e454dc

Please sign in to comment.