Skip to content
Permalink
Browse files

[gps] Fix disabled import controls after selecting GPX file

(cherry-picked from 95c48f1)
  • Loading branch information
nyalldawson committed Apr 17, 2018
1 parent f1a9c93 commit 57fe444dbab55850c1497dfdba701594bbbd1688
Showing with 8 additions and 20 deletions.
  1. +8 −20 src/plugins/gps_importer/qgsgpsplugingui.cpp
@@ -188,26 +188,14 @@ void QgsGpsPluginGui::enableRelevantControls()
// load GPX
if ( tabWidget->currentIndex() == 0 )
{
if ( !mFileWidget->filePath().isEmpty() )
{
pbnOK->setEnabled( false );
cbGPXWaypoints->setEnabled( false );
cbGPXRoutes->setEnabled( false );
cbGPXTracks->setEnabled( false );
cbGPXWaypoints->setChecked( false );
cbGPXRoutes->setChecked( false );
cbGPXTracks->setChecked( false );
}
else
{
pbnOK->setEnabled( true );
cbGPXWaypoints->setEnabled( true );
cbGPXWaypoints->setChecked( true );
cbGPXRoutes->setEnabled( true );
cbGPXTracks->setEnabled( true );
cbGPXRoutes->setChecked( true );
cbGPXTracks->setChecked( true );
}
bool enabled = !mFileWidget->filePath().isEmpty();
pbnOK->setEnabled( enabled );
cbGPXWaypoints->setEnabled( enabled );
cbGPXRoutes->setEnabled( enabled );
cbGPXTracks->setEnabled( enabled );
cbGPXWaypoints->setChecked( enabled );
cbGPXRoutes->setChecked( enabled );
cbGPXTracks->setChecked( enabled );
}

// import other file

0 comments on commit 57fe444

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