mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Regenerate previews after zoom (#11919)
This commit is contained in:
parent
3917cab408
commit
e26a60edef
@ -4253,6 +4253,13 @@ void Buffer::updateTitles() const
|
||||
}
|
||||
|
||||
|
||||
void Buffer::scheduleRedrawWorkAreas() const
|
||||
{
|
||||
if (d->wa_)
|
||||
d->wa_->scheduleRedraw();
|
||||
}
|
||||
|
||||
|
||||
void Buffer::resetAutosaveTimers() const
|
||||
{
|
||||
if (d->gui_)
|
||||
|
@ -666,6 +666,8 @@ public:
|
||||
void setBusy(bool on) const;
|
||||
/// Update window titles of all users.
|
||||
void updateTitles() const;
|
||||
/// Schedule redraw of work areas
|
||||
void scheduleRedrawWorkAreas() const;
|
||||
/// Reset autosave timers for all users.
|
||||
void resetAutosaveTimers() const;
|
||||
///
|
||||
|
@ -62,6 +62,13 @@ void WorkAreaManager::updateTitles()
|
||||
}
|
||||
|
||||
|
||||
void WorkAreaManager::scheduleRedraw()
|
||||
{
|
||||
for (WorkArea * wa : work_areas_)
|
||||
wa->scheduleRedraw(true);
|
||||
}
|
||||
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
/// Update window titles of all users and the external modifications
|
||||
/// warning.
|
||||
void updateTitles();
|
||||
/// Schedule redraw of work areas
|
||||
void scheduleRedraw();
|
||||
/// If there is no work area, create a new one in the current view using the
|
||||
/// buffer buf. Returns false if not possible.
|
||||
bool unhide(Buffer * buf) const;
|
||||
|
@ -69,6 +69,8 @@
|
||||
#include "Toolbars.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "graphics/PreviewLoader.h"
|
||||
|
||||
#include "support/convert.h"
|
||||
#include "support/debug.h"
|
||||
#include "support/ExceptionMessage.h"
|
||||
@ -4891,6 +4893,10 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
lyxrc.currentZoom, lyxrc.defaultZoom));
|
||||
|
||||
guiApp->fontLoader().update();
|
||||
// Regenerate instant previews
|
||||
if (lyxrc.preview != LyXRC::PREVIEW_OFF
|
||||
&& doc_buffer && doc_buffer->loader())
|
||||
doc_buffer->loader()->refreshPreviews();
|
||||
dr.screenUpdate(Update::ForceAll | Update::FitCursor);
|
||||
break;
|
||||
}
|
||||
|
@ -799,6 +799,7 @@ void PreviewLoader::Impl::finishedGenerating(pid_t pid, int retval)
|
||||
imageReady(*nit->get());
|
||||
}
|
||||
finished_generating_ = true;
|
||||
buffer_.scheduleRedrawWorkAreas();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user