Skip to content

Commit

Permalink
Fix message box logic
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ committed Nov 20, 2017
1 parent ecde835 commit 06017b9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app/qgsmapthemes.cpp
Expand Up @@ -163,10 +163,8 @@ void QgsMapThemes::removeCurrentPreset()
int res = QMessageBox::question( mMenu, tr( "Remove Theme" ),
trUtf8( "Are you sure you want to remove the existing theme “%1”?" ).arg( actionPreset->text() ),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No );
if ( res != QMessageBox::Yes )
return;
//remove the selected preset
QgsProject::instance()->mapThemeCollection()->removeMapTheme( actionPreset->text() );
if ( res == QMessageBox::Yes )
QgsProject::instance()->mapThemeCollection()->removeMapTheme( actionPreset->text() );
break;
}
}
Expand Down

0 comments on commit 06017b9

Please sign in to comment.