Skip to content

Commit

Permalink
Show "no CRS" option in dialog when appropriate
Browse files Browse the repository at this point in the history
The projection selection widget (combobox) has a flag `CrsNotSet` that allows showing an additional entry for selection no CRS.
The projection selection dialog also has this option (setShowNoProjection). However, a dialog started from a widget with the option
set did not have this option set up to now.
  • Loading branch information
m-kuhn authored and nyalldawson committed Jun 14, 2019
1 parent 3ed9a53 commit 2b6c767
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/qgsprojectionselectionwidget.cpp
Expand Up @@ -171,9 +171,11 @@ void QgsProjectionSelectionWidget::selectCrs()
//find out crs id of current proj4 string
QgsProjectionSelectionDialog dlg( this );
dlg.setMessage( mMessage );
if ( mCrs.isValid() )
dlg.setCrs( mCrs );

if ( optionVisible( QgsProjectionSelectionWidget::CrsOption::CrsNotSet ) )
{
dlg.setCrs( mCrs );
dlg.setShowNoProjection( true );
}

if ( dlg.exec() )
Expand Down

0 comments on commit 2b6c767

Please sign in to comment.