Skip to content

Commit

Permalink
Don't show the attribute action popup menu if there are no actions de…
Browse files Browse the repository at this point in the history
…fined

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5503 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Jun 1, 2006
1 parent d410a8f commit 122a9fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/gui/qgsattributetable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ void QgsAttributeTable::popupMenu(int row, int col, const QPoint& pos)
// mActionValues vector.
mClickedOnValue = col;

mActionPopup->popup(pos);
if (mActions.size() > 0)
mActionPopup->popup(pos);
}

void QgsAttributeTable::popupItemSelected(QAction* menuAction)
Expand Down
7 changes: 2 additions & 5 deletions src/gui/qgsidentifyresults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ void QgsIdentifyResults::popupContextMenu(Q3ListViewItem* item,
{
mActionPopup = new QMenu();
QAction *a = mActionPopup->addAction( tr("Run action") );
QFont f = a->font();
f.setBold(true);
a->setFont(f);

mActionPopup->addSeparator();

QgsAttributeAction::aIter iter = mActions.begin();
Expand Down Expand Up @@ -132,7 +128,8 @@ void QgsIdentifyResults::popupContextMenu(Q3ListViewItem* item,
child = child->nextSibling();
}

mActionPopup->popup(p);
if (mActions.size() > 0)
mActionPopup->popup(p);
}
// Restore last window position/size and show the window
void QgsIdentifyResults::restorePosition()
Expand Down

0 comments on commit 122a9fc

Please sign in to comment.