From 8e633570bf07bfddc65ff5ff6005dbdc8bd36f0f Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sun, 8 Mar 2009 10:21:33 +0000 Subject: [PATCH] Fix bug 5357: Close tab possible without close tab icon http://bugzilla.lyx.org/show_bug.cgi?id=5357 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28727 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiWorkArea.cpp | 3 ++- src/frontends/qt4/GuiWorkArea.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index f638805ab0..0be171bcad 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -1320,7 +1320,7 @@ TabWorkArea::TabWorkArea(QWidget * parent) QObject::connect(this, SIGNAL(currentChanged(int)), this, SLOT(on_currentTabChanged(int))); - QToolButton * closeBufferButton = new QToolButton(this); + closeBufferButton = new QToolButton(this); closeBufferButton->setPalette(pal); // FIXME: rename the icon to closebuffer.png closeBufferButton->setIcon(QIcon(":/images/closetab.png")); @@ -1365,6 +1365,7 @@ void TabWorkArea::showBar(bool show) { tabBar()->setEnabled(show); tabBar()->setVisible(show); + closeBufferButton->setVisible(show); } diff --git a/src/frontends/qt4/GuiWorkArea.h b/src/frontends/qt4/GuiWorkArea.h index 06f9e2d313..a2e8bee71e 100644 --- a/src/frontends/qt4/GuiWorkArea.h +++ b/src/frontends/qt4/GuiWorkArea.h @@ -35,6 +35,7 @@ class QDropEvent; class QKeyEvent; class QWheelEvent; class QPaintEvent; +class QToolButton; class QWidget; #ifdef CursorShape @@ -328,7 +329,10 @@ private Q_SLOTS: void moveTab(int fromIndex, int toIndex); private: + /// int clicked_tab_; + /// + QToolButton * closeBufferButton; }; // TabWorkArea -- 2.39.2