[fractal/fractal-next] sidebar: Use freeze_notify
- From: Julian Sparber <jsparber src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/fractal-next] sidebar: Use freeze_notify
- Date: Fri, 21 May 2021 15:15:54 +0000 (UTC)
commit 7617aaa923d903107ca558c3709ab29452e57af3
Author: Kévin Commaille <zecakeh tedomum fr>
Date: Fri May 21 17:04:10 2021 +0200
sidebar: Use freeze_notify
Closes #763
src/session/sidebar/selection.rs | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/session/sidebar/selection.rs b/src/session/sidebar/selection.rs
index 6eeabf76..d978efb9 100644
--- a/src/session/sidebar/selection.rs
+++ b/src/session/sidebar/selection.rs
@@ -168,6 +168,8 @@ impl Selection {
pub fn set_model<P: IsA<gio::ListModel>>(&self, model: Option<&P>) {
let priv_ = imp::Selection::from_instance(self);
+ let _guard = self.freeze_notify();
+
let model = model.map(|m| m.clone().upcast::<gio::ListModel>());
let old_model = self.model();
@@ -306,6 +308,8 @@ impl Selection {
fn items_changed_cb(&self, model: &gio::ListModel, position: u32, removed: u32, added: u32) {
let priv_ = imp::Selection::from_instance(self);
+ let _guard = self.freeze_notify();
+
let selected = self.selected();
let selected_room = self.selected_room();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]