Fix instant preview for split views showing the same document.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34054 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2010-04-05 14:24:27 +00:00
parent 318774fe1a
commit 05ca681dcf

View File

@ -3313,13 +3313,20 @@ void GuiView::toggleFullScreen()
Buffer const * GuiView::updateInset(Inset const * inset)
{
if (!d.current_work_area_)
if (!inset)
return 0;
if (inset)
d.current_work_area_->scheduleRedraw();
Buffer const * inset_buffer = &(inset->buffer());
return &d.current_work_area_->bufferView().buffer();
for (int i = 0; i != d.splitter_->count(); ++i) {
GuiWorkArea * wa = d.tabWorkArea(i)->currentWorkArea();
if (!wa)
continue;
Buffer const * buffer = &(wa->bufferView().buffer());
if (inset_buffer == buffer)
wa->scheduleRedraw();
}
return inset_buffer;
}