* Hide groups combobox when there are no groups in scan popup window.

This commit is contained in:
Konstantin Isakov 2009-02-08 21:26:35 +00:00
parent 956b7cfaee
commit 2264df6716
2 changed files with 9 additions and 3 deletions

View file

@ -298,6 +298,14 @@ void ScanPopup::resizeEvent( QResizeEvent * event )
QDialog::resizeEvent( event );
}
void ScanPopup::showEvent( QShowEvent * ev )
{
QDialog::showEvent( ev );
if ( groups.empty() )
ui.groupList->hide();
}
void ScanPopup::prefixMatchComplete( WordFinderResults r )
{
// Check that the request wasn't already overridden by another one and
@ -394,8 +402,5 @@ void ScanPopup::pinButtonClicked( bool checked )
else
setWindowFlags( Qt::Popup );
// Should we disable grip? I like it with the grip better.
//ui.gripArea->setDisabled( checked );
show();
}

View file

@ -62,6 +62,7 @@ private:
virtual void mouseReleaseEvent( QMouseEvent * );
virtual void leaveEvent( QEvent * event );
virtual void resizeEvent( QResizeEvent * event );
virtual void showEvent( QShowEvent * );
void popupWordlist( vector< QString > const &, QToolButton * button );