[libadwaita/wip/exalm/tab-view-fix: 2/2] tab-view: Update the model later when attaching pages
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/tab-view-fix: 2/2] tab-view: Update the model later when attaching pages
- Date: Wed, 9 Jun 2021 07:43:16 +0000 (UTC)
commit e39cb4d857c387e709165637c1509967eb9cce3d
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Jun 9 12:39:59 2021 +0500
tab-view: Update the model later when attaching pages
Fixes https://gitlab.gnome.org/GNOME/libadwaita/-/issues/192
src/adw-tab-view.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/adw-tab-view.c b/src/adw-tab-view.c
index 88b17e72..b04a1518 100644
--- a/src/adw-tab-view.c
+++ b/src/adw-tab-view.c
@@ -782,9 +782,6 @@ attach_page (AdwTabView *self,
set_page_parent (page, NULL);
g_signal_emit (self, signals[SIGNAL_PAGE_ATTACHED], 0, page, position);
-
- if (self->pages)
- g_list_model_items_changed (G_LIST_MODEL (self->pages), position, 0, 1);
}
static void
@@ -935,6 +932,9 @@ insert_page (AdwTabView *self,
if (!self->selected_page)
adw_tab_view_set_selected_page (self, page);
+ if (self->pages)
+ g_list_model_items_changed (G_LIST_MODEL (self->pages), position, 0, 1);
+
return page;
}
@@ -3257,6 +3257,9 @@ adw_tab_view_attach_page (AdwTabView *self,
adw_tab_view_set_selected_page (self, page);
+ if (self->pages)
+ g_list_model_items_changed (G_LIST_MODEL (self->pages), position, 0, 1);
+
end_transfer_for_group (self);
g_object_unref (page);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]