Skip to content

Commit 06017b9

Browse files
authoredNov 20, 2017
Fix message box logic
1 parent ecde835 commit 06017b9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎src/app/qgsmapthemes.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,8 @@ void QgsMapThemes::removeCurrentPreset()
163163
int res = QMessageBox::question( mMenu, tr( "Remove Theme" ),
164164
trUtf8( "Are you sure you want to remove the existing theme “%1”?" ).arg( actionPreset->text() ),
165165
QMessageBox::Yes | QMessageBox::No, QMessageBox::No );
166-
if ( res != QMessageBox::Yes )
167-
return;
168-
//remove the selected preset
169-
QgsProject::instance()->mapThemeCollection()->removeMapTheme( actionPreset->text() );
166+
if ( res == QMessageBox::Yes )
167+
QgsProject::instance()->mapThemeCollection()->removeMapTheme( actionPreset->text() );
170168
break;
171169
}
172170
}

0 commit comments

Comments
 (0)
Please sign in to comment.