X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiToc.cpp;h=787bbb7058b458efddfa609794727b95ecb02925;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=528c4863e890bbdd2a781bbac00d81eafd86f32c;hpb=86392456e8c847c7a1507e35cd7bdee799e3564c;p=lyx.git diff --git a/src/frontends/qt4/GuiToc.cpp b/src/frontends/qt4/GuiToc.cpp index 528c4863e8..787bbb7058 100644 --- a/src/frontends/qt4/GuiToc.cpp +++ b/src/frontends/qt4/GuiToc.cpp @@ -33,7 +33,7 @@ namespace lyx { namespace frontend { GuiToc::GuiToc(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags) - : DockView(parent, "toc", qt_("Outline"), area, flags) + : DockView(parent, "toc", qt_("Outline"), area, flags), is_closing_(false) { widget_ = new TocWidget(parent, this); setWidget(widget_); @@ -91,6 +91,15 @@ void GuiToc::enableView(bool enable) widget_->updateView(); } + +void GuiToc::closeEvent(QCloseEvent * /*event*/) +{ + is_closing_ = true; + ((GuiView *)parent())->updateToolbars(); + is_closing_ = false; +} + + void GuiToc::doDispatch(Cursor & cur, FuncRequest const & cmd) { widget_->doDispatch(cur, cmd);