small tweak for split view.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23083 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-20 20:05:01 +00:00
parent 0902821097
commit f9963f83c8

View File

@ -224,17 +224,16 @@ struct GuiView::GuiViewPrivate
// The first TabWorkArea is always the first one, if any.
return tabWorkArea(0);
TabWorkArea * tab_widget = 0;
for (int i = 0; i != splitter_->count(); ++i) {
QWidget * w = splitter_->widget(i);
if (!w->hasFocus())
continue;
tab_widget = dynamic_cast<TabWorkArea *>(w);
if (tab_widget)
break;
if (TabWorkArea * tab_widget = dynamic_cast<TabWorkArea *>(w))
return tab_widget;
}
return tab_widget;
// None has the focus so we just take the first one.
return tabWorkArea(0);
}
public: