- Expand parent folder when a new subfolder is created

- Fixed folder renaming
This commit is contained in:
Christophe Dumez 2009-08-22 15:33:31 +00:00
parent 07dbe388f4
commit b9f1586068

View file

@ -129,6 +129,8 @@ void RSSImp::askNewFolder() {
folder_item->setText(1, new_folder->getName());
folder_item->setData(2,Qt::DisplayRole, QVariant((int)RssFile::FOLDER));
folder_item->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/oxygen/folder.png")));
// Expand parent folder to display new folder
parent_item->setExpanded(true);
rssmanager->saveStreamList();
}
}
@ -230,6 +232,8 @@ void RSSImp::renameFiles() {
QString newName = QInputDialog::getText(this, tr("Please choose a new name for this RSS feed"), tr("New feed name:"), QLineEdit::Normal, rssmanager->getFile(getItemPath(item))->getName(), &ok);
if(ok) {
rssmanager->rename(getItemPath(item), newName);
item->setText(0, newName);
item->setText(1, newName);
}
}