35 g_CurrentFile = f; |
36 g_CurrentFile = f; |
36 |
37 |
37 g_qWindow->R->hardRefresh(); |
38 g_qWindow->R->hardRefresh(); |
38 } |
39 } |
39 |
40 |
|
41 void openModel (str zPath) { |
|
42 if (g_CurrentFile) |
|
43 closeModel (); |
|
44 |
|
45 OpenFile* pFile = IO_OpenLDrawFile (zPath); |
|
46 g_CurrentFile = pFile; |
|
47 |
|
48 // Recalculate the bounding box |
|
49 g_BBox.calculate(); |
|
50 |
|
51 // Rebuild the object tree view now. |
|
52 g_qWindow->buildObjList (); |
|
53 g_qWindow->setTitle (); |
|
54 } |
|
55 |
40 void saveModel () { |
56 void saveModel () { |
41 if (!g_CurrentFile) |
57 if (!g_CurrentFile) |
42 return; |
58 return; |
43 |
59 |
44 FILE* fp = fopen (g_CurrentFile->zFileName, "w"); |
60 FILE* fp = fopen (g_CurrentFile->zFileName, "w"); |