Skip to content
Permalink
Browse files

Fix incorrect cursors shown in datum transform select dialog

  • Loading branch information
nyalldawson committed Mar 12, 2019
1 parent e10d13f commit 593f55f3386c2ae754bdd65e3d682f9bf33b5e0a
Showing with 5 additions and 4 deletions.
  1. +2 −4 src/gui/qgsdatumtransformdialog.cpp
  2. +3 −0 src/gui/qgsdatumtransformdialog.h
@@ -21,6 +21,7 @@
#include "qgslogger.h"
#include "qgssettings.h"
#include "qgsproject.h"
#include "qgsguiutils.h"

#include <QDir>
#include <QPushButton>
@@ -31,6 +32,7 @@ QgsDatumTransformDialog::QgsDatumTransformDialog( const QgsCoordinateReferenceSy
QWidget *parent,
Qt::WindowFlags f )
: QDialog( parent, f )
, mPreviousCursorOverride( qgis::make_unique< QgsTemporaryCursorRestoreOverride >() ) // this dialog is often shown while cursor overrides are in place, so temporarily remove them
{
setupUi( this );

@@ -53,8 +55,6 @@ QgsDatumTransformDialog::QgsDatumTransformDialog( const QgsCoordinateReferenceSy
mDestinationCrs = destinationCrs;
mDatumTransforms = QgsDatumTransform::datumTransformations( sourceCrs, destinationCrs );

QApplication::setOverrideCursor( Qt::ArrowCursor );

setOKButtonEnabled();

QgsSettings settings;
@@ -172,8 +172,6 @@ QgsDatumTransformDialog::~QgsDatumTransformDialog()
{
settings.setValue( QStringLiteral( "Windows/DatumTransformDialog/columnWidths/%1" ).arg( i ), mDatumTransformTableWidget->columnWidth( i ) );
}

QApplication::restoreOverrideCursor();
}

int QgsDatumTransformDialog::availableTransformationCount()
@@ -23,6 +23,8 @@
#include "qgscoordinatetransform.h"
#include "qgis_gui.h"

class QgsTemporaryCursorRestoreOverride;

#define SIP_NO_FILE

/**
@@ -74,6 +76,7 @@ class GUI_EXPORT QgsDatumTransformDialog : public QDialog, private Ui::QgsDatumT
QList< QgsDatumTransform::TransformPair > mDatumTransforms;
QgsCoordinateReferenceSystem mSourceCrs;
QgsCoordinateReferenceSystem mDestinationCrs;
std::unique_ptr< QgsTemporaryCursorRestoreOverride > mPreviousCursorOverride;
};

#endif // QGSDATUMTRANSFORMDIALOG_H

0 comments on commit 593f55f

Please sign in to comment.
You can’t perform that action at this time.