mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Properly reschedule refresh of previews
If the zoom factor is changed right while the previews are being regenerated, the refreshPreviews() method is a no-op. So, reschedule the refresh until everything is ready.
This commit is contained in:
parent
2973108a62
commit
592219c1f1
@ -450,6 +450,11 @@ PreviewLoader::Impl::preview(string const & latex_snippet) const
|
||||
void PreviewLoader::Impl::refreshPreviews()
|
||||
{
|
||||
font_scaling_factor_ = int(buffer_.fontScalingFactor());
|
||||
// Reschedule refresh until the previous process completed.
|
||||
if (!finished_generating_) {
|
||||
delay_refresh_->start(1000);
|
||||
return;
|
||||
}
|
||||
Cache::const_iterator cit = cache_.begin();
|
||||
Cache::const_iterator cend = cache_.end();
|
||||
while (cit != cend)
|
||||
|
Loading…
Reference in New Issue
Block a user