From 74395a962ef58de3947bdc54e64a3f491a7ff2a9 Mon Sep 17 00:00:00 2001 From: benfitzpatrick Date: Fri, 22 Jun 2012 15:48:37 +0100 Subject: [PATCH] Fix null graph view disappearing act --- lib/cylc/gui/SuiteControl.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/cylc/gui/SuiteControl.py b/lib/cylc/gui/SuiteControl.py index ff41ff67717..5a54b3f9fad 100644 --- a/lib/cylc/gui/SuiteControl.py +++ b/lib/cylc/gui/SuiteControl.py @@ -273,8 +273,8 @@ def change_view_layout( self, horizontal=False ): else: new_pane = gtk.VPaned() extent = top_parent.get_allocation().height - new_pane.pack1( self.view_containers[0] ) - new_pane.pack2( self.view_containers[1] ) + new_pane.pack1( self.view_containers[0], resize=True, shrink=True ) + new_pane.pack2( self.view_containers[1], resize=True, shrink=True ) new_pane.set_position( extent / 2 ) top_parent.pack_start( new_pane, expand=True, fill=True ) self.window.show_all() @@ -419,8 +419,11 @@ def create_view( self, viewname=None, view_num=0, pane_position=-1 ): if pane_position == -1: pane_position = extent / 2 pane.set_position( pane_position ) - zero_parent.pack_start(pane, expand=True, fill=True) - container.pack_start( view.get_control_widgets(), + zero_parent.pack_start(pane, expand=True, fill=True) + view_widgets = view.get_control_widgets() + if view_widgets.size_request() == (0, 0): + view_widgets.set_size_request(1, 1) + container.pack_start( view_widgets, expand=True, fill=True ) # Handle menu for view_menuitems in self.current_view_menuitems: