mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
new buffer on double click in empty area of the tab bar
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34201 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8dffd93995
commit
5485f39539
@ -1391,6 +1391,20 @@ TabWorkArea::TabWorkArea(QWidget * parent)
|
||||
}
|
||||
|
||||
|
||||
void TabWorkArea::mouseDoubleClickEvent(QMouseEvent * event)
|
||||
{
|
||||
if (event->button() != Qt::LeftButton)
|
||||
return;
|
||||
|
||||
// return early if double click on existing tabs
|
||||
for (int i = 0; i < count(); ++i)
|
||||
if (tabBar()->tabRect(i).contains(event->pos()))
|
||||
return;
|
||||
|
||||
dispatch(FuncRequest(LFUN_BUFFER_NEW));
|
||||
}
|
||||
|
||||
|
||||
void TabWorkArea::setFullScreen(bool full_screen)
|
||||
{
|
||||
for (int i = 0; i != count(); ++i) {
|
||||
|
@ -337,6 +337,8 @@ private Q_SLOTS:
|
||||
void showContextMenu(const QPoint & pos);
|
||||
///
|
||||
void moveTab(int fromIndex, int toIndex);
|
||||
///
|
||||
void mouseDoubleClickEvent(QMouseEvent * event);
|
||||
|
||||
private:
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user