Skip to content

Commit

Permalink
[gps] Fix disabled import controls after selecting GPX file
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 17, 2018
1 parent 63e450a commit 95c48f1
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions src/plugins/gps_importer/qgsgpsplugingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 95c48f1

Please sign in to comment.