[gnome-builder] view-stack: focus moved view, rather than it's document



commit 1b60fdffe7265fdebf440cab127aa16be818cddc
Author: Christian Hergert <christian hergert me>
Date:   Thu Sep 3 20:48:55 2015 -0700

    view-stack: focus moved view, rather than it's document
    
    The document could be attached to another view, so make sure we focus
    the moved view rather than (potentially) another view with the same
    document.

 src/views/gb-view-grid.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/views/gb-view-grid.c b/src/views/gb-view-grid.c
index f3fa5bb..2c95c65 100644
--- a/src/views/gb-view-grid.c
+++ b/src/views/gb-view-grid.c
@@ -294,9 +294,9 @@ gb_view_grid_stack_split (GbViewGrid      *self,
       g_object_ref (view);
       gb_view_stack_remove (stack, view);
       gb_view_stack_add (GTK_CONTAINER (target), GTK_WIDGET (view));
+      gb_view_stack_set_active_view (GB_VIEW_STACK (target), GTK_WIDGET (view));
       g_object_unref (view);
 
-      gb_view_stack_focus_document (GB_VIEW_STACK (target), document);
       break;
 
     case GB_VIEW_GRID_SPLIT_RIGHT:
@@ -314,9 +314,9 @@ gb_view_grid_stack_split (GbViewGrid      *self,
       g_object_ref (view);
       gb_view_stack_remove (stack, view);
       gb_view_stack_add (GTK_CONTAINER (target), GTK_WIDGET (view));
+      gb_view_stack_set_active_view (GB_VIEW_STACK (target), GTK_WIDGET (view));
       g_object_unref (view);
 
-      gb_view_stack_focus_document (GB_VIEW_STACK (target), document);
       break;
 
     default:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]