]> git.lyx.org Git - features.git/commitdiff
Transfer the setting of the current LyXView from workArea::focusInEvent() to GuiView...
authorAbdelrazak Younes <younes@lyx.org>
Thu, 4 Oct 2007 15:46:58 +0000 (15:46 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 4 Oct 2007 15:46:58 +0000 (15:46 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20732 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiWorkArea.cpp

index fc091ed73a5e8b6898987716f983277b9b5da6c5..ac2e1fd4a453e52563931e2d4c4d197aac6dfe22 100644 (file)
@@ -741,6 +741,7 @@ bool GuiViewBase::event(QEvent * e)
        //      break;
 
        case QEvent::WindowActivate:
+               theApp()->setCurrentView(*this);
                if (d.tab_widget_->count()) {
                        GuiWorkArea * wa = dynamic_cast<GuiWorkArea *>(
                                d.tab_widget_->currentWidget());
index 117889af8abb1e3990471e8ef2e2090c3ab3da7b..9853a56930563075aedeb1f08cbedf9a7ebfc00c 100644 (file)
@@ -263,12 +263,6 @@ void GuiWorkArea::adjustViewWithScrollBar(int action)
 
 void GuiWorkArea::focusInEvent(QFocusEvent * /*event*/)
 {
-       // No need to do anything if we didn't change views...
-//     if (theApp() == 0 || &lyx_view_ == theApp()->currentView())
-//             return;
-
-       theApp()->setCurrentView(*lyx_view_);
-
        // Repaint the whole screen.
        // Note: this is different from redraw() as only the backing pixmap
        // will be redrawn, which is cheap.