renombrado eficiente de bibliotecas

This commit is contained in:
Luis Ángel San Martín
2013-06-21 23:29:52 +02:00
parent 8b00e649b8
commit 8e3df875ae
5 changed files with 35 additions and 3 deletions

View File

@ -1247,11 +1247,11 @@ void LibraryWindow::rename(QString newName)
QString currentLibrary = selectedLibrary->currentText();
QString path = libraries.value(currentLibrary);
libraries.remove(currentLibrary);
selectedLibrary->removeItem(selectedLibrary->currentIndex());
//selectedLibrary->removeItem(selectedLibrary->currentIndex());
libraries.insert(newName,path);
selectedLibrary->addItem(newName,path);
selectedLibrary->renameCurrentLibrary(newName);
saveLibraries();
selectedLibrary->setCurrentIndex(selectedLibrary->findText(newName));
//selectedLibrary->setCurrentIndex(selectedLibrary->findText(newName));
}
void LibraryWindow::cancelCreating()