mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-27 10:37:53 +00:00
Disallow multiple concurrent previews as we are not ready for that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32603 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
05264e38bc
commit
363809c7e0
@ -268,6 +268,8 @@ struct GuiView::GuiViewPrivate
|
|||||||
|
|
||||||
void setPreviewFuture(QFuture<docstring> const & f)
|
void setPreviewFuture(QFuture<docstring> const & f)
|
||||||
{
|
{
|
||||||
|
if (preview_watcher_.isRunning())
|
||||||
|
preview_watcher_.waitForFinished();
|
||||||
preview_watcher_.setFuture(f);
|
preview_watcher_.setFuture(f);
|
||||||
connect(&preview_watcher_, SIGNAL(finished()), gv_,
|
connect(&preview_watcher_, SIGNAL(finished()), gv_,
|
||||||
SLOT(threadFinished()));
|
SLOT(threadFinished()));
|
||||||
@ -1312,12 +1314,13 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
|||||||
|
|
||||||
case LFUN_MASTER_BUFFER_UPDATE:
|
case LFUN_MASTER_BUFFER_UPDATE:
|
||||||
case LFUN_MASTER_BUFFER_VIEW:
|
case LFUN_MASTER_BUFFER_VIEW:
|
||||||
enable = doc_buffer && doc_buffer->parent() != 0;
|
enable = doc_buffer && doc_buffer->parent() != 0
|
||||||
|
&& !d.preview_watcher_.isRunning();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_BUFFER_UPDATE:
|
case LFUN_BUFFER_UPDATE:
|
||||||
case LFUN_BUFFER_VIEW: {
|
case LFUN_BUFFER_VIEW: {
|
||||||
if (!doc_buffer) {
|
if (!doc_buffer || d.preview_watcher_.isRunning()) {
|
||||||
enable = false;
|
enable = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user