Permalink
Browse files

Fix a quick bug in removing the default BE, it should now make the fi…

…rst BE default.
  • Loading branch information...
1 parent 5297889 commit 13dd2f65067d3792f4e8920f07c03a7902892bc7 Ken Moore committed Aug 8, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 src-qt4/pc-bootconfig/mainUI.cpp
@@ -395,13 +395,14 @@ void mainUI::on_tool_BErem_clicked(){
}
//Verify removal
if( QMessageBox::Yes == QMessageBox::question(this,tr("Verify BE Removal"),tr("Are you sure you want to delete the following boot environment?")+"\n\n"+name, QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel) ){
- if(index < G_defaultBE){
- G_defaultBE--; //make sure we keep the same default BE
+ if(index <= G_defaultBE){
+ if(index < G_defaultBE){ G_defaultBE--; }//make sure we keep the same default BE
+ else{ G_defaultBE=0; } //Removing the default BE
saveGRUBdefaults(G_themeFile, G_fontFile, G_timer, G_showMenu, G_defaultBE);
- updateGRUBdefaults();
}
beadmRemove(name);
updateBEList();
+ updateGRUBdefaults();
}
}
}

0 comments on commit 13dd2f6

Please sign in to comment.