mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-16 05:45:51 +01:00
Do not refresh if the zoom level does not change
This commit is contained in:
parent
15838abf56
commit
3e61e14fe3
1 changed files with 5 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "page-widget.h"
|
#include "page-widget.h"
|
||||||
#include "adjustment.h"
|
#include "adjustment.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||||
|
@ -1404,6 +1405,10 @@ sc_zoom(girara_session_t* session, girara_argument_t* argument, girara_event_t*
|
||||||
zathura_document_set_scale(zathura->document, zoom_max);
|
zathura_document_set_scale(zathura->document, zoom_max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const double new_zoom = zathura_document_get_scale(zathura->document);
|
||||||
|
if (fabs(new_zoom - old_zoom) <= DBL_EPSILON)
|
||||||
|
return false;
|
||||||
|
|
||||||
render_all(zathura);
|
render_all(zathura);
|
||||||
refresh_view(zathura);
|
refresh_view(zathura);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue