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:
parent
5009566ea5
commit
471237d2ce
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue