From 5cadc33792084560cdc319b9a73b7026d58e1e98 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Wed, 1 Nov 2006 22:57:32 +0000 Subject: [PATCH] This commit initialise correctly the tab bar in a new window. * GuiView::init(): switch to the first avalaible buffer if any. * GuiWorkArea::focusInEvent(): update the LyXView tab bar there. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15685 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiView.C | 3 +++ src/frontends/qt4/GuiWorkArea.C | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/frontends/qt4/GuiView.C b/src/frontends/qt4/GuiView.C index 91c2d850dc..0bdc5bfa5c 100644 --- a/src/frontends/qt4/GuiView.C +++ b/src/frontends/qt4/GuiView.C @@ -150,6 +150,9 @@ void GuiView::init() QObject::connect(&statusbar_timer_, SIGNAL(timeout()), this, SLOT(update_view_state_qt())); + if (!work_area_->bufferView().buffer() && !theBufferList().empty()) + setBuffer(theBufferList().first()); + // make sure the buttons are disabled if needed updateToolbars(); updateLayoutChoice(); diff --git a/src/frontends/qt4/GuiWorkArea.C b/src/frontends/qt4/GuiWorkArea.C index 2d285d8e87..069738cb2a 100644 --- a/src/frontends/qt4/GuiWorkArea.C +++ b/src/frontends/qt4/GuiWorkArea.C @@ -288,6 +288,9 @@ void GuiWorkArea::dropEvent(QDropEvent* event) void GuiWorkArea::focusInEvent(QFocusEvent * /*event*/) { + // FIXME: it would be better to send a signal "newBuffer()" + // in BufferList that could be connected to the different tabbar. + lyx_view_.updateTab(); startBlinkingCursor(); }