[glom/glom-1-18] Details: Avoid an empty layout when changing to developer mode.



commit 507a3b7e10de502290300c7a108db6e0827495e9
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Sep 20 23:25:17 2011 +0200

    Details: Avoid an empty layout when changing to developer mode.
    
    	* glom/mode_data/box_data_details.cc: on_userlevel_changed(): Recreate
    	and refill the layout, instead of just recreating it.

 ChangeLog                          |    7 +++++++
 glom/mode_data/box_data_details.cc |    3 ++-
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f5db13b..720a857 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-20  Murray Cumming  <murrayc murrayc com>
+
+	Details: Avoid an empty layout when changing to developer mode.
+
+	* glom/mode_data/box_data_details.cc: on_userlevel_changed(): Recreate 
+	and refill the layout, instead of just recreating it.
+
 2011-07-15  Murray Cumming  <murrayc murrayc com>
 
 	Avoid autoconf warning about datarootdir.
diff --git a/glom/mode_data/box_data_details.cc b/glom/mode_data/box_data_details.cc
index a7987e5..2005181 100644
--- a/glom/mode_data/box_data_details.cc
+++ b/glom/mode_data/box_data_details.cc
@@ -942,8 +942,9 @@ void Box_Data_Details::on_userlevel_changed(AppState::userlevels user_level)
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   m_design_mode = ( user_level == AppState::USERLEVEL_DEVELOPER );
   m_FlowTable.set_design_mode(m_design_mode);
+
   // Recreate the layout to correctly set the size of empty flowtables:
-  create_layout();
+  init_db_details(m_found_set, m_layout_platform, m_primary_key_value);
 #endif
 }
 



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