-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 2461e26..81a4318 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -823,16 +823,17 @@ void AdvancedFm::okRename() { QListView * view = CurrentView();
QString path = CurrentDir()->canonicalPath() + "/";
oldName = path + oldName;
newName = path + newName;
if( rename( oldName.latin1(), newName.latin1())== -1)
QMessageBox::message(tr("Note"),tr("Could not rename"));
else
oldName = "";
- view->takeItem( view->currentItem() );
- delete view->currentItem();
+ QListViewItem *item = view->currentItem();
+ view->takeItem( item );
+ delete item;
rePopulate();
}
void AdvancedFm::openSearch() {
QMessageBox::message(tr("Note"),tr("Not Yet Implemented"));
}
|