Merge pull request #2795 from tarkah/fix/image-viewer-redraw
Request redraw in image viewer update
This commit is contained in:
commit
940a079d83
1 changed files with 5 additions and 0 deletions
|
|
@ -215,6 +215,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shell.request_redraw();
|
||||||
shell.capture_event();
|
shell.capture_event();
|
||||||
}
|
}
|
||||||
Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) => {
|
Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) => {
|
||||||
|
|
@ -226,6 +227,8 @@ where
|
||||||
|
|
||||||
state.cursor_grabbed_at = Some(cursor_position);
|
state.cursor_grabbed_at = Some(cursor_position);
|
||||||
state.starting_offset = state.current_offset;
|
state.starting_offset = state.current_offset;
|
||||||
|
|
||||||
|
shell.request_redraw();
|
||||||
shell.capture_event();
|
shell.capture_event();
|
||||||
}
|
}
|
||||||
Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left)) => {
|
Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left)) => {
|
||||||
|
|
@ -233,6 +236,7 @@ where
|
||||||
|
|
||||||
if state.cursor_grabbed_at.is_some() {
|
if state.cursor_grabbed_at.is_some() {
|
||||||
state.cursor_grabbed_at = None;
|
state.cursor_grabbed_at = None;
|
||||||
|
shell.request_redraw();
|
||||||
shell.capture_event();
|
shell.capture_event();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -273,6 +277,7 @@ where
|
||||||
};
|
};
|
||||||
|
|
||||||
state.current_offset = Vector::new(x, y);
|
state.current_offset = Vector::new(x, y);
|
||||||
|
shell.request_redraw();
|
||||||
shell.capture_event();
|
shell.capture_event();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue