-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 2ddcabc..e7c0b6a 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -1050,88 +1050,88 @@ void AdvancedFm::cancelRename() { view = Remote_View; } bool resetFocus = view->viewport()->focusProxy() == renameBox; delete renameBox; renameBox = 0; if ( resetFocus ) { view->viewport()->setFocusProxy( view); view->setFocus(); } } void AdvancedFm::doRename(QListView * view) { QRect r = view->itemRect( view->currentItem( )); r = QRect( view->viewportToContents( r.topLeft() ), r.size() ); r.setX( view->contentsX() ); if ( r.width() > view->visibleWidth() ) r.setWidth( view->visibleWidth() ); renameBox = new QLineEdit( view->viewport(), "qt_renamebox" ); renameBox->setFrame(true); renameBox->setText( view->currentItem()->text(0) ); renameBox->selectAll(); renameBox->installEventFilter( this ); view->addChild( renameBox, r.x(), r.y() ); renameBox->resize( r.size() ); view->viewport()->setFocusProxy( renameBox ); renameBox->setFocus(); renameBox->show(); } void AdvancedFm::localRename() { oldName = Local_View->currentItem()->text(0); doRename(Local_View ); populateLocalView(); } void AdvancedFm::remoteRename() { oldName = Remote_View->currentItem()->text(0); - doRename(Local_View ); + doRename(Remote_View ); populateRemoteView(); } void AdvancedFm::okRename() { QString newName = renameBox->text(); cancelRename(); int tabs=0; QListView * view; tabs = TabWidget->getCurrentTab(); if ( tabs == 0) { view = Local_View; QString path = currentDir.canonicalPath() + "/"; oldName = path + oldName; newName = path + newName; } else { view = Remote_View; QString path = currentRemoteDir.canonicalPath() + "/"; oldName = path + oldName; newName = path + newName; } if( view->currentItem() == NULL) return; if( rename(oldName.latin1(), newName.latin1())== -1) QMessageBox::message(tr("Note"),tr("Could not rename")); else oldName = ""; view->takeItem( view->currentItem() ); delete view->currentItem(); if ( tabs == 0) populateLocalView(); else populateRemoteView(); } |