Skip to content
Snippets Groups Projects
Commit e30b9d6e authored by Provot Bertrand's avatar Provot Bertrand
Browse files

when deleting a filter, displays the next filter

parent 42c2ce7f
No related branches found
No related tags found
No related merge requests found
......@@ -420,8 +420,13 @@ void FilterChoice::deleteFilter()
if(msgBox.exec() == QMessageBox::Yes)
{
QString name = _blurChoices->itemText(_blurChoices->currentIndex());
_blurChoices->setCurrentIndex(_blurChoices->currentIndex() - 1);
_blurChoices->removeItem(_blurChoices->currentIndex() + 1);
if(_blurChoices->currentIndex()==0){
_blurChoices->setCurrentIndex(_blurChoices->currentIndex());
_blurChoices->removeItem(_blurChoices->currentIndex());
}else{
_blurChoices->setCurrentIndex(_blurChoices->currentIndex()-1);
_blurChoices->removeItem(_blurChoices->currentIndex()+1);
}
QFile file("filters.xml");
if(file.exists())
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment