removed setCurrentIndex(0) after removing a library

This commit is contained in:
Luis Ángel San Martín
2013-06-30 12:49:52 +02:00
parent 605f5c9621
commit f3c481811d

View File

@ -1181,7 +1181,7 @@ void LibraryWindow::deleteCurrentLibrary()
QString path = libraries.value(selectedLibrary->currentText());
libraries.remove(selectedLibrary->currentText());
selectedLibrary->removeItem(selectedLibrary->currentIndex());
selectedLibrary->setCurrentIndex(0);
//selectedLibrary->setCurrentIndex(0);
path = path+"/.yacreaderlibrary";
QDir d(path);
@ -1206,7 +1206,7 @@ void LibraryWindow::removeLibrary()
{
libraries.remove(currentLibrary);
selectedLibrary->removeItem(selectedLibrary->currentIndex());
selectedLibrary->setCurrentIndex(0);
//selectedLibrary->setCurrentIndex(0);
if(libraries.size()==0)//no more libraries avaliable.
{
comicView->setModel(NULL);