fix paper size is not changed with resolution changed bug

This commit is contained in:
gb 2023-05-09 09:09:14 +08:00
parent d6246133d8
commit 11a3b02543
1 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,7 @@ void image_capture::set_dpi_val(int dpi)
int x = dpi,
y = dpi;
dpi_x_ = dpi_y_ = dpi;
if(first)
first = false;
else
@ -455,6 +456,8 @@ bool image_capture::update_enabled(const char* name, std::function<GET_SANE_OPT_
if(strcmp(name, "paper") == 0)
refresh_paper_size(CHG_PAPER_SIZE_FROM_PAPER);
else if(strcmp(name, "resolution") == 0)
refresh_paper_size(CHG_PAPER_SIZE_FROM_DPI);
return changed;
}