mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 10:35:22 -04:00
Fixed calculation of the right QModelIndex for context menu. Indroduced with QSortFilterProxyModel.
Removed unnecessary calls to the librs in RemoveDirModel. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3708 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
741948acff
commit
162a949092
2 changed files with 48 additions and 97 deletions
|
@ -693,10 +693,12 @@ void SharedFilesDialog::postModDirectories(bool update_local)
|
|||
void SharedFilesDialog::sharedDirTreeWidgetContextMenu( QPoint point )
|
||||
{
|
||||
//=== at this moment we'll show menu only for files, not for folders
|
||||
QModelIndex midx = ui.localDirTreeView->indexAt(point);
|
||||
//if (localModel->isDir( midx ) )
|
||||
// return;
|
||||
|
||||
QModelIndex idx = ui.localDirTreeView->indexAt(point);
|
||||
if (!idx.isValid())
|
||||
return;
|
||||
QModelIndex midx = localProxyModel->mapToSource(idx);
|
||||
if (!midx.isValid())
|
||||
return;
|
||||
currentFile = localModel->data(midx, RemoteDirModel::FileNameRole).toString();
|
||||
|
||||
QMenu contextMnu2( this );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue