]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/TocWidget.cpp
Remove the .aux and .bbl files and update the citation labels
[lyx.git] / src / frontends / qt4 / TocWidget.cpp
index f67d39119c13bc0cf11d50429ef9d2017e6a90c8..80c9db97d952a6ab773ca96eca3f0675fbc5f7a8 100644 (file)
@@ -245,7 +245,7 @@ void TocWidget::on_updateTB_clicked()
        // The backend update can take some time so we disable
        // the controls while waiting.
        enableControls(false);
-       gui_view_.tocModels().updateBackend();
+       gui_view_.currentBufferView()->buffer().updateBuffer();
 }
 
 
@@ -401,6 +401,12 @@ void TocWidget::updateView()
        if (update_delay_ == -1)
                return;
        QTimer::singleShot(update_delay_, this, SLOT(updateViewForce()));
+       // Subtler optimization for having the delay more UI invisible.
+       // We trigger update immediately for sparse editation actions,
+       // i.e. there was no editation/cursor movement in last 2 sec.
+       // At worst there will be +1 redraw after 2s in a such "calm" mode.
+       if (update_delay_ != 0)
+               updateViewForce();
        update_delay_ = -1;
 }