@@ -268,25 +268,24 @@ def OnSaveCinema(event):
268268 DATA_CSV_FILENAME = "data.csv"
269269 def show_project_dialog ():
270270 dialog = wx .MessageDialog (
271- None ,
272- "Continue with current Cinema project or create a new one?" ,
271+ G2frame ,
272+ "Reuse previous Cinema project or create a new one?" ,
273273 "Project Selection" ,
274274 wx .OK | wx .CANCEL | wx .ICON_QUESTION
275275 )
276- dialog .SetOKCancelLabels ("Continue " , "New Project" )
277-
276+ dialog .SetOKCancelLabels ("Reuse " , "New Project" )
277+ dialog . CenterOnParent ()
278278 result = dialog .ShowModal ()
279279 dialog .Destroy ()
280-
281280 if result == wx .ID_OK :
282281 return True
283282 else :
284283 return False
285284
286- #colLabels = G2frame.seqResults_colLabels
287- #table_data = G2frame.SeqTable.GetData()
285+ # create a table of values from sequential table, copying
286+ # the number of displayed digits and removing unneeded entries
288287 nRows = len (G2frame .SeqTable .GetData ())
289- colLabels = []
288+ colLabels = ['File' ]
290289 colDecimals = []
291290 useCol = []
292291 for i ,lbl in enumerate (G2frame .seqResults_colLabels ):
@@ -303,7 +302,7 @@ def show_project_dialog():
303302 colDecimals .append ('6' )
304303 table_data = []
305304 for r in range (nRows ):
306- row = []
305+ row = [G2frame . SeqTable . GetRowLabelValue ( r ) ]
307306 for i ,val in enumerate (G2frame .SeqTable .GetData ()[r ]):
308307 if not useCol [i ]: continue
309308 row .append (f"{ val :.{colDecimals [i ]}f} " )
@@ -350,7 +349,7 @@ def show_project_dialog():
350349 # Actions when creating a new project
351350 json_path = os .path .join (selected_dir , DB_JSON_FILENAME )
352351
353- dlg = wx .Dialog (None , title = "New CINEMA Project Parameters" , size = (400 , 200 ))
352+ dlg = wx .Dialog (G2frame , title = "New Cinema:D-S Project Parameters" , size = (400 , 200 ))
354353 panel = wx .Panel (dlg )
355354 main_sizer = wx .BoxSizer (wx .VERTICAL )
356355
@@ -360,13 +359,13 @@ def show_project_dialog():
360359
361360 # Project name field
362361 name_label = wx .StaticText (panel , label = "Project Name:" )
363- name_ctrl = wx .TextCtrl (panel , value = "New Project Cinema" )
362+ name_ctrl = wx .TextCtrl (panel , value = "GSAS-II Cinema Export " )
364363 grid_sizer .Add (name_label , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALIGN_LEFT )
365364 grid_sizer .Add (name_ctrl , 1 , wx .EXPAND | wx .ALIGN_LEFT )
366365
367366 # Database directory field
368367 dir_label = wx .StaticText (panel , label = "DB Directory: data/..." )
369- dir_ctrl = wx .TextCtrl (panel , value = "exampledb .cdb" )
368+ dir_ctrl = wx .TextCtrl (panel , value = "g2db .cdb" )
370369 grid_sizer .Add (dir_label , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALIGN_LEFT )
371370 grid_sizer .Add (dir_ctrl , 1 , wx .EXPAND | wx .ALIGN_LEFT )
372371
@@ -427,8 +426,7 @@ def show_project_dialog():
427426
428427 with open (file_path , 'w' , encoding = 'utf-8' ) as fil :
429428 fil .write (", " .join (colLabels ))
430- fil .write (",FILE " )
431- fil .write ("\n " )
429+ fil .write (", FILE\n " )
432430
433431 for r in range (nRows ):
434432 fil .write (", " .join (table_data [r ]))
0 commit comments