| | 63 | if (Gui.GetScriptInitResult()!="") |
| | 64 | { |
| | 65 | // GuiImplT::InitErrorT excecptions are caught in the caller code. |
| | 66 | // Here we handle the case that initializing the GUI succeeded "halfway". |
| | 67 | wxMessageBox("GUI file "+GuiInitFileName+" was loaded, but errors occurred:\n\n"+ |
| | 68 | Gui.GetScriptInitResult()+"\n\n"+ |
| | 69 | "You may choose to ignore this error and proceed,\n"+ |
| | 70 | "but it is probably better to edit the file and manually fix the problem first.", |
| | 71 | "GUI initialization warning", wxOK | wxICON_EXCLAMATION); |
| | 72 | } |
| | 73 | |
| | 172 | // Recursively makes sure that the children of each window have unique names. |
| | 173 | // Normally the other GUI editor code should make sure that that is always true, but right now it |
| | 174 | // is possible to create violations of this constraint via drag-and-drop in the window hierarchy tree |
| | 175 | // (can drop a window as a child of another window that already has a child with the same name). |
| | 176 | static void CheckWindowNames(cf::GuiSys::WindowT* Window) |
| | 177 | { |
| | 178 | const std::string OldName=Window->Name; |
| | 179 | |
| | 180 | ((EditorDataWindowT*)Window->EditorData)->RepairNameUniqueness(); |
| | 181 | |
| | 182 | if (Window->Name!=OldName) |
| | 183 | ((EditorDataWindowT*)Window->EditorData)->GetGuiDoc()->UpdateAllObservers_Modified(Window, WMD_PROPERTY_CHANGED, "Name"); |
| | 184 | |
| | 185 | for (unsigned long ChildNr=0; ChildNr<Window->Children.Size(); ChildNr++) |
| | 186 | CheckWindowNames(Window->Children[ChildNr]); |
| | 187 | } |
| | 188 | |
| | 189 | |