Skip to content
Permalink
Browse files
Don't show the attribute action popup menu if there are no actions de…
…fined

git-svn-id: http://svn.osgeo.org/qgis/trunk@5503 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Jun 1, 2006
1 parent c9eaae5 commit 743889cdac4dbc12ef5e02410513cc64869f0c9c
Showing with 4 additions and 6 deletions.
  1. +2 −1 src/gui/qgsattributetable.cpp
  2. +2 −5 src/gui/qgsidentifyresults.cpp
@@ -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)
@@ -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();
@@ -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()

0 comments on commit 743889c

Please sign in to comment.