Skip to content

Commit 743889c

Browse files
author
g_j_m
committedJun 1, 2006
Don't show the attribute action popup menu if there are no actions defined
git-svn-id: http://svn.osgeo.org/qgis/trunk@5503 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent c9eaae5 commit 743889c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed
 

‎src/gui/qgsattributetable.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ void QgsAttributeTable::popupMenu(int row, int col, const QPoint& pos)
316316
// mActionValues vector.
317317
mClickedOnValue = col;
318318

319-
mActionPopup->popup(pos);
319+
if (mActions.size() > 0)
320+
mActionPopup->popup(pos);
320321
}
321322

322323
void QgsAttributeTable::popupItemSelected(QAction* menuAction)

‎src/gui/qgsidentifyresults.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ void QgsIdentifyResults::popupContextMenu(Q3ListViewItem* item,
8282
{
8383
mActionPopup = new QMenu();
8484
QAction *a = mActionPopup->addAction( tr("Run action") );
85-
QFont f = a->font();
86-
f.setBold(true);
87-
a->setFont(f);
88-
8985
mActionPopup->addSeparator();
9086

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

135-
mActionPopup->popup(p);
131+
if (mActions.size() > 0)
132+
mActionPopup->popup(p);
136133
}
137134
// Restore last window position/size and show the window
138135
void QgsIdentifyResults::restorePosition()

0 commit comments

Comments
 (0)
Please sign in to comment.