mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Transfer some more code from GuiView to TabWorkArea.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20807 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
769185bc90
commit
0f67ab46b7
@ -264,12 +264,7 @@ GuiViewBase::~GuiViewBase()
|
||||
void GuiViewBase::close()
|
||||
{
|
||||
quitting_by_menu_ = true;
|
||||
while (d.tab_widget_->count()) {
|
||||
GuiWorkArea * wa = dynamic_cast<GuiWorkArea *>(d.tab_widget_->widget(0));
|
||||
BOOST_ASSERT(wa);
|
||||
d.tab_widget_->removeTab(0);
|
||||
delete wa;
|
||||
}
|
||||
d.tab_widget_->closeAll();
|
||||
QMainWindow::close();
|
||||
quitting_by_menu_ = false;
|
||||
}
|
||||
|
@ -728,6 +728,17 @@ void TabWorkArea::showBar(bool show)
|
||||
}
|
||||
|
||||
|
||||
void TabWorkArea::closeAll()
|
||||
{
|
||||
while (count()) {
|
||||
GuiWorkArea * wa = dynamic_cast<GuiWorkArea *>(widget(0));
|
||||
BOOST_ASSERT(wa);
|
||||
removeTab(0);
|
||||
delete wa;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool TabWorkArea::setCurrentWorkArea(GuiWorkArea * work_area)
|
||||
{
|
||||
BOOST_ASSERT(work_area);
|
||||
|
@ -180,6 +180,7 @@ class TabWorkArea : public QTabWidget
|
||||
public:
|
||||
TabWorkArea(QWidget * parent = 0);
|
||||
void showBar(bool show);
|
||||
void closeAll();
|
||||
bool setCurrentWorkArea(GuiWorkArea *);
|
||||
bool removeWorkArea(GuiWorkArea *);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user