mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
* Hide groups combobox when there are no groups in scan popup window.
This commit is contained in:
parent
956b7cfaee
commit
2264df6716
|
@ -298,6 +298,14 @@ void ScanPopup::resizeEvent( QResizeEvent * event )
|
||||||
QDialog::resizeEvent( event );
|
QDialog::resizeEvent( event );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScanPopup::showEvent( QShowEvent * ev )
|
||||||
|
{
|
||||||
|
QDialog::showEvent( ev );
|
||||||
|
|
||||||
|
if ( groups.empty() )
|
||||||
|
ui.groupList->hide();
|
||||||
|
}
|
||||||
|
|
||||||
void ScanPopup::prefixMatchComplete( WordFinderResults r )
|
void ScanPopup::prefixMatchComplete( WordFinderResults r )
|
||||||
{
|
{
|
||||||
// Check that the request wasn't already overridden by another one and
|
// Check that the request wasn't already overridden by another one and
|
||||||
|
@ -394,8 +402,5 @@ void ScanPopup::pinButtonClicked( bool checked )
|
||||||
else
|
else
|
||||||
setWindowFlags( Qt::Popup );
|
setWindowFlags( Qt::Popup );
|
||||||
|
|
||||||
// Should we disable grip? I like it with the grip better.
|
|
||||||
//ui.gripArea->setDisabled( checked );
|
|
||||||
|
|
||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ private:
|
||||||
virtual void mouseReleaseEvent( QMouseEvent * );
|
virtual void mouseReleaseEvent( QMouseEvent * );
|
||||||
virtual void leaveEvent( QEvent * event );
|
virtual void leaveEvent( QEvent * event );
|
||||||
virtual void resizeEvent( QResizeEvent * event );
|
virtual void resizeEvent( QResizeEvent * event );
|
||||||
|
virtual void showEvent( QShowEvent * );
|
||||||
|
|
||||||
void popupWordlist( vector< QString > const &, QToolButton * button );
|
void popupWordlist( vector< QString > const &, QToolButton * button );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue