]> git.lyx.org Git - lyx.git/commitdiff
fix #9826: Outline disclosure of subsection content disappears one second after
authorGuillaume Munch <gm@lyx.org>
Sun, 8 May 2016 22:56:55 +0000 (23:56 +0100)
committerRichard Heck <rgheck@lyx.org>
Sun, 29 May 2016 21:55:44 +0000 (17:55 -0400)
doubleclicking content item.

This is only meant as a workaround. See #6675 for more general issues regarding
unwanted collapse of the tree view.

src/frontends/qt4/TocWidget.cpp

index 4fa6aef7a3a215743f3c41323b260ab5ad14e84f..ff929c08f73b388ae5428645f6f16cde6d615f70 100644 (file)
@@ -47,7 +47,6 @@ TocWidget::TocWidget(GuiView & gui_view, QWidget * parent)
        : QWidget(parent), depth_(0), persistent_(false), gui_view_(gui_view),
          update_timer_short_(new QTimer(this)),
          update_timer_long_(new QTimer(this))
-
 {
        setupUi(this);
 
@@ -98,6 +97,13 @@ TocWidget::TocWidget(GuiView & gui_view, QWidget * parent)
        connect(update_timer_long_, SIGNAL(timeout()),
                this, SLOT(realUpdateView()));
 
+       // fix #9826: Outline disclosure of subsection content disappears one second
+       // after doubleclicking content item.
+       // This is only meant as a workaround. See #6675 for more general issues
+       // regarding unwanted collapse of the tree view.
+       connect(tocTV, SIGNAL(expanded(const QModelIndex &)),
+               update_timer_long_, SLOT(stop()));
+
        init(QString());
 }
 
@@ -399,12 +405,14 @@ void TocWidget::updateView()
        update_timer_long_->start();
 }
 
+
 void TocWidget::updateViewNow()
 {
        update_timer_long_->stop();
        update_timer_short_->start();
 }
 
+
 void TocWidget::realUpdateView()
 {
        if (!gui_view_.documentBufferView()) {