128 |
128 |
129 // If we just closed the current file, we need to set the current |
129 // If we just closed the current file, we need to set the current |
130 // file as something else. |
130 // file as something else. |
131 if (this == LDFile::current()) { |
131 if (this == LDFile::current()) { |
132 // If we closed the last file, create a blank one. |
132 // If we closed the last file, create a blank one. |
133 if (g_loadedFiles.size() == 0) |
133 if (countExplicitFiles() == 0) |
134 newFile(); |
134 newFile(); |
135 else |
135 else { |
136 LDFile::setCurrent (g_loadedFiles[0]); |
136 // Find the first explicit file loaded |
|
137 int idx = 0; |
|
138 while (g_loadedFiles[idx]->implicit()) |
|
139 idx++; |
|
140 |
|
141 LDFile::setCurrent (g_loadedFiles[idx]); |
|
142 } |
137 } |
143 } |
138 |
144 |
139 g_win->updateFileList(); |
145 g_win->updateFileList(); |
140 } |
146 } |
141 |
147 |