leveled term view: only notify when level is changed

This commit is contained in:
Michael Sippel 2021-08-11 17:43:23 +02:00
parent 45df06adac
commit 2d17254b2c
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -57,13 +57,15 @@ impl LeveledTermView {
} }
pub fn set_level(&mut self, l: usize) { pub fn set_level(&mut self, l: usize) {
self.level = l; if self.level != l {
self.level = l;
// update complete area // update complete area
if let Some(a) = self.src.area() { if let Some(a) = self.src.area() {
self.cast.notify_each(a); self.cast.notify_each(a);
}
} }
} }
} }
impl ImplIndexView for LeveledTermView { impl ImplIndexView for LeveledTermView {