remove a bug in peersdialog

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2317 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-02-14 14:17:58 +00:00
parent 3015f74f6e
commit 4435ccf228

View File

@ -211,6 +211,11 @@ PeersDialog::PeersDialog(QWidget *parent)
void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point )
{
QTreeWidgetItem *c = getCurrentPeer();
if (!c) {
//no peer selected
return;
}
QMenu contextMnu( this );
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
@ -239,7 +244,6 @@ void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point )
exportfriendAct = new QAction(QIcon(IMAGE_EXPIORTFRIEND), tr( "Export Friend" ), this );
connect( exportfriendAct , SIGNAL( triggered() ), this, SLOT( exportfriend() ) );
QTreeWidgetItem *c = getCurrentPeer();
if (c->type() == 0) {
//this is a GPG key
removefriendAct = new QAction(QIcon(IMAGE_REMOVEFRIEND), tr( "Deny Friend" ), this );