mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Don't create new empty tab on double click outside the tab bar
This commit is contained in:
parent
c8e4138f51
commit
0d60382e98
|
@ -55,7 +55,9 @@ bool MainTabWidget::eventFilter( QObject * obj, QEvent * ev )
|
|||
if( ev->type() == QEvent::MouseButtonDblClick )
|
||||
{
|
||||
QMouseEvent * mev = static_cast< QMouseEvent *>( ev );
|
||||
if( tabBar()->tabAt( mev->pos() ) == -1 )
|
||||
if( mev->y() >= tabBar()->rect().y()
|
||||
&& mev->y() <= tabBar()->rect().y() + tabBar()->rect().height()
|
||||
&& tabBar()->tabAt( mev->pos() ) == -1 )
|
||||
{
|
||||
emit doubleClicked();
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue