Changeset 239

Show
Ignore:
Timestamp:
08/20/08 16:45:45 (4 years ago)
Author:
PRGazis
Message:

Fixed bug that could cause segfault during an unusual sequence of failed read operations, added a Clear All Data menu option, revised and cleaned up README and help menu

Files:
5 modified

Legend:

Unmodified
Added
Removed
  • README

    r238 r239  
    6767Usage: 
    6868 
    69 In its current form (Version 2.1.2, build 238) 'viewpoints' is run either by  
     69In its current form (Version 2.1.3, build 239) 'viewpoints' is run either by  
    7070clicking on the 'vp' icon or from the command line in the directory in which  
    7171it has been installed or to which a path is available.  When viewpoints is  
     
    231231 File|Save all data          Write all data 
    232232 File|Save selected data     Write only the currently selected data 
    233  File|Load Configuration     Load basic configuration information 
    234  File|Save Configuration     Save basic configuration information 
     233 File|Load Configuration     Load configuration information 
     234 File|Save Configuration     Save configuration information 
     235 File|Clear all data         Replace data with a small default array 
    235236 File|Quit                   Quit 
    236237 View|File Name              Show name of current data file 
     
    374375Notes and warnings: 
    375376 
    376 The current release of the 'viewpoints' package (version 2.1.2, build 238) is  
     377The current release of the 'viewpoints' package (version 2.1.3, build 239) is  
    377378still a development version.  While every effort has been make to ensure that  
    378379it will work -- or fail gracefully if it doesn't -- it still has many rough  
  • data_file_manager.cpp

    r238 r239  
    345345      sWarning.append( "Restoring existing data."); 
    346346      column_info = old_column_info; 
     347      points.resize( old_points.shape()); 
    347348      points = old_points; 
    348       points.resize( old_points.shape()); 
    349349      npoints = points.columns(); 
    350350      nvars = points.rows(); 
  • global_definitions_vp.h

    r238 r239  
    182182//# Make absolutely certain SVN_VERSION is defined 
    183183#ifdef __WIN32__ 
    184   #define SVN_VERSION "Windows revision 238" 
     184  #define SVN_VERSION "Windows revision 239" 
    185185#endif 
    186186#ifndef SVN_VERSION 
  • vp.cpp

    r238 r239  
    562562    } 
    563563    else if( strncmp( widgetTitle, "Append", 6) == 0 || 
    564         strncmp( widgetTitle, "Merge", 5) == 0) { 
     564        strncmp( widgetTitle, "Merge", 5) == 0 || 
     565        strncmp( widgetTitle, "Clear all", 9) == 0) { 
    565566      thisOperation = NEW_DATA; 
    566567      do_restore_settings = 1; 
     
    930931    (Fl_Callback *) save_state, 0, FL_MENU_DIVIDER); 
    931932  main_menu_bar->add(  
     933    "File/Clear all data       ", 0,  
     934    (Fl_Callback *) read_data, (void*) "clear all data"); 
     935  main_menu_bar->add(  
    932936    "File/Quit   ", 0, (Fl_Callback *) exit); 
    933937 
     
    13121316  else dfm.do_merge( 0); 
    13131317 
    1314   // If this was a "Reload File" operation and we know the name of the 
    1315   // data file, do nothing.  Otherwise invoke the findInputFile() method of  
    1316   // the data_file_manager object to query the user for the input filename. 
    1317   // If no file is specified, return immediately and hope the calling routine  
    1318   // can handle this situation. 
    1319   if( ( strstr( (char *) user_data, "reload") != NULL) && 
     1318  // If this was a "Clear all data" operation, query the user and set the 
     1319  // doCleaarAllData flag.  If this was a "Reload File" operation and we  
     1320  // know the name of the data file, do nothing.  Otherwise invoke the  
     1321  // findInputFile() method of the data_file_manager object to query the  
     1322  // user for the input filename.  If no file is specified, return  
     1323  // immediately and hope the calling routine can handle this situation. 
     1324  unsigned doClearAllData = 0; 
     1325  if( strstr( (char *) user_data, "clear") != NULL) { 
     1326    if( !expert_mode && 
     1327        make_confirmation_window( "Clear all data?  Are you sure?") <= 0) 
     1328      return; 
     1329    doClearAllData = 1; 
     1330  } 
     1331  else if( ( strstr( (char *) user_data, "reload") != NULL) && 
    13201332      (dfm.input_filespec()).length() > 0) { 
    13211333  } 
     
    13291341  } 
    13301342 
    1331   // Invoke the load_data_file() method of the data_file_manager object to  
    1332   // read the data file.  Error reporting is handled by the method itself. 
    1333   dfm.load_data_file(); 
     1343  // If the doClearAllData flag is set, invoke the create_default_data() 
     1344  // method of the Data_File_Manager object to generate default data,  
     1345  // otherwise invoke the load_data_file() method to read the data file.   
     1346  // Error reporting is handled by the relevant methods. 
     1347  if( doClearAllData) dfm.create_default_data( 10); 
     1348  else dfm.load_data_file(); 
    13341349 
    13351350  // If only one or fewer records are available, quit before something  
     
    19091924 
    19101925  about_string = "\n\ 
    1911     viewpoints 2.1.2 \n\ 
     1926    viewpoints 2.1.3 \n\ 
    19121927    " + string(SVN_VERSION) + "\n\ 
    19131928    \n\ 
  • vp_help_manual.htm

    r238 r239  
    152152<tr> 
    153153 <td>File|Load Configuration</td> 
    154  <td>Load <em>some</em> configuration information</td> 
     154 <td>Load configuration information</td> 
    155155</tr> 
    156156<tr> 
    157157 <td>File|Save Configuration</td> 
    158  <td>Save <em>some</em> configuration information</td> 
     158 <td>Save configuration information</td> 
     159</tr> 
     160<tr> 
     161 <td>File|Clear all data</td> 
     162 <td>Clear data and replace it with a small default array</td> 
    159163</tr> 
    160164<tr> 
     
    255259<a name="Plot_Window_Controls"></a> 
    256260<table> 
    257 <tr><td colspan="2"><b>Tabbed control panels for <em>windows</em></td></tr> 
     261<tr><td colspan="2"><b>Tabbed control panels for <em>windows</em></b></td></tr> 
    258262<tr> 
    259263 <th align="LEFT">Control</th><th align="LEFT">Action</th> 
     
    357361<a name="Brush_Controls"></a> 
    358362<table> 
    359 <tr><td colspan="2"><b>Tabbed control panels for <em>brushes</em></td></tr> 
     363<tr><td colspan="2"><b>Tabbed control panels for <em>brushes</em></b></td></tr> 
    360364<tr> 
    361365 <th align="LEFT">Control</th><th align="LEFT">Action</th> 
     
    400404<p> 
    401405<table> 
    402 <tr><td colspan="2"><b>Main control panel</td></tr> 
     406<tr><td colspan="2"><b>Main control panel</b></td></tr> 
    403407<tr> 
    404408 <th align="LEFT">Control</th><th align="LEFT">Action</th> 
     
    420424</tr> 
    421425<tr> 
    422  <td>change axes</td><td>Change all (unlocked) axes in all plots.  Good for browsing. 
     426 <td>change axes</td><td>Change all (unlocked) axes in all plots.  Good for browsing.</td> 
    423427</tr> 
    424428<tr> 
     
    522526 
    523527<p> 
    524 The current release of the 'viewpoints' package (version 2.1.2, build 238)  
     528The current release of the 'viewpoints' package (version 2.1.3, build 239)  
    525529is still a development version.  While every effort has been make to ensure  
    526530that it will work -- or fail gracefully if it doesn't -- it still has many