| 1936 | } |
| 1937 | |
| 1938 | void LibraryWindow::rename(QString newName) // TODO replace |
| 1939 | { |
| 1940 | QString currentLibrary = selectedLibrary->currentText(); |
| 1941 | if (newName != currentLibrary) { |
| 1942 | if (!libraries.contains(newName)) { |
| 1943 | libraries.rename(currentLibrary, newName); |
| 1944 | // selectedLibrary->removeItem(selectedLibrary->currentIndex()); |
| 1945 | // libraries.addLibrary(newName,path); |
| 1946 | selectedLibrary->renameCurrentLibrary(newName); |
| 1947 | libraries.save(); |
| 1948 | renameLibraryDialog->close(); |
| 1949 | #ifndef Y_MAC_UI |
| 1950 | if (!foldersModelProxy->mapToSource(foldersView->currentIndex()).isValid()) |
| 1951 | libraryToolBar->setCurrentFolderName(selectedLibrary->currentText()); |
| 1952 | #endif |
| 1953 | } else { |
| 1954 | libraryAlreadyExists(newName); |
| 1955 | } |
| 1956 | } else |
| 1957 | renameLibraryDialog->close(); |
| 1958 | // selectedLibrary->setCurrentIndex(selectedLibrary->findText(newName)); |
| 1959 | } |
| 1960 | |
| 1961 | void LibraryWindow::rescanLibraryForXMLInfo() |
| 1962 | { |
no test coverage detected