Vincent van Ravesteijn schreef:
Jürgen Spitzmüller schreef:
Vincent van Ravesteijn wrote:
Can I start backporting the fixes for the following bugs:

5998, 2034, 2213, 3706, 3918, 4177, 4509, 4952, 5390, 5435, 5458, 5944,
5948 ?

Yes. Please post the patches subsequently.

Jürgen
Patch for bug 3918.

Vincent
Index: src/frontends/qt4/GuiView.cpp
===================================================================
--- src/frontends/qt4/GuiView.cpp       (revision 30476)
+++ src/frontends/qt4/GuiView.cpp       (working copy)
@@ -2429,7 +2429,7 @@
        map<string, DialogPtr>::const_iterator it = d.dialogs_.find(name);
        if (it == d.dialogs_.end())
                return false;
-       return it->second.get()->isVisibleView();
+       return it->second.get()->isVisibleView() && 
!it->second.get()->isClosing();
 }
 
 
Index: src/frontends/qt4/GuiToc.cpp
===================================================================
--- src/frontends/qt4/GuiToc.cpp        (revision 30476)
+++ src/frontends/qt4/GuiToc.cpp        (working copy)
@@ -33,7 +33,7 @@
 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_);
@@ -92,6 +92,14 @@
 }
 
 
+void GuiToc::closeEvent(QCloseEvent * event)
+{
+       is_closing_ = true;
+       ((GuiView *)parent())->updateToolbars();
+       is_closing_ = false;
+}
+
+
 Dialog * createGuiToc(GuiView & lv)
 {
        GuiView & guiview = static_cast<GuiView &>(lv);
Index: src/frontends/qt4/GuiToc.h
===================================================================
--- src/frontends/qt4/GuiToc.h  (revision 30476)
+++ src/frontends/qt4/GuiToc.h  (working copy)
@@ -49,6 +49,8 @@
        void updateView();
        void enableView(bool enable);
        bool wantInitialFocus() const { return false; }
+       void closeEvent(QCloseEvent * event);
+       bool isClosing() const { return is_closing_; }
 
 public:
        /// clean-up on hide.
@@ -61,6 +63,8 @@
 private:
        ///
        TocWidget * widget_;
+       ///
+       bool is_closing_;
 };
 
 } // namespace frontend

Reply via email to