Fix panic when resizing

The selection might have a beginning or end that is outside the bounds
after a resize and cause a panic on subsequent draws. Easy solution is
to just clear the selection on resize.
This commit is contained in:
Joe Wilm 2017-08-21 10:59:45 -07:00
parent 5009566ea5
commit 471237d2ce
1 changed files with 1 additions and 0 deletions

View File

@ -194,6 +194,7 @@ pub struct Processor<N> {
impl<N> OnResize for Processor<N> {
fn on_resize(&mut self, size: &SizeInfo) {
self.size_info = size.to_owned();
self.selection = None;
}
}