Skip to content

Commit

Permalink
Message bar: do not add menu with "close all" if there is just one me…
Browse files Browse the repository at this point in the history
…ssage
  • Loading branch information
wonder-sk committed Oct 28, 2013
1 parent d176026 commit 4ad4bdf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/qgsmessagebar.cpp
Expand Up @@ -320,4 +320,8 @@ void QgsMessageBar::resetCountdown()
void QgsMessageBar::updateItemCount()
{
mItemCount->setText( mItems.count() > 0 ? tr( "%n more", "unread messages", mItems.count() ) : QString( "" ) );

// do not show the down arrow for opening menu with "close all" if there is just one message
mCloseBtn->setMenu( mItems.count() > 0 ? mCloseMenu : 0 );
mCloseBtn->setPopupMode( mItems.count() > 0 ? QToolButton::MenuButtonPopup : QToolButton::DelayedPopup );
}

0 comments on commit 4ad4bdf

Please sign in to comment.