Changeset 25 for trunk/src/MainPter.cxx
- Timestamp:
- 04/11/06 11:16:59 (3 years ago)
- Files:
-
- 1 modified
-
trunk/src/MainPter.cxx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MainPter.cxx
r24 r25 142 142 IMainView &view = getView (); 143 143 gchar *fileName = view.openFileDialog (); 144 GError *error; 145 if ( m_Document->loadFile (fileName, NULL, &error) ) 144 // if openFileDialog returns NULL, then the user cancelled the operation. 145 // I don't need to do anything in this case. I'm only interested when 146 // the user tried to open a file. 147 if ( NULL != fileName ) 146 148 { 147 // Now that the document has been loaded, just reset the initial 148 // state. 149 setInitialState (); 150 g_free (fileName); 149 GError *error; 150 if ( m_Document->loadFile (fileName, NULL, &error) ) 151 { 152 // Now that the document has been loaded, just reset the initial 153 // state. 154 setInitialState (); 155 g_free (fileName); 156 } 151 157 } 152 158 }
