Changeset 123 for cafu/trunk/CaWE/GuiEditor/WindowTree.cpp
- Timestamp:
- 08/19/10 23:35:41 (21 months ago)
- Files:
-
- 1 modified
-
cafu/trunk/CaWE/GuiEditor/WindowTree.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/CaWE/GuiEditor/WindowTree.cpp
r36 r123 281 281 wxASSERT(Windows.Size()==1); // Can't set the name property for more windows since it must always be unique. 282 282 283 wxTreeItemId TreeItem=FindTreeItem(GetRootItem(), Windows[0]);284 285 283 SetItemText(FindTreeItem(GetRootItem(), Windows[0]), Windows[0]->Name); 286 284 } … … 290 288 for (unsigned long WindowNr=0; WindowNr<Windows.Size(); WindowNr++) 291 289 { 292 int ImageNr=0; 293 294 if (!Windows[WindowNr]->ShowWindow) ImageNr=1; 295 296 SetItemImage(FindTreeItem(GetRootItem(), Windows[WindowNr]), ImageNr); 290 SetItemImage(FindTreeItem(GetRootItem(), Windows[WindowNr]), Windows[WindowNr]->ShowWindow ? 0 : 1); 297 291 } 298 292 } … … 307 301 ArrayT<wxTreeItemId> TreeItems; 308 302 ArrayT<cf::GuiSys::WindowT*> ExpandedWindows; 303 304 // Note that this may well produce TreeItems whose windows have been deleted from the document already. 309 305 GetTreeItems(GetRootItem(), TreeItems); 310 306 … … 344 340 345 341 // Make sure parents are also expanded. 346 while (GetItemParent(Result).IsOk())342 while (GetItemParent(Result).IsOk()) 347 343 { 348 344 Result=GetItemParent(Result); … … 356 352 // Expand all previously expanded items. 357 353 for (unsigned long ExWinNr=0; ExWinNr<ExpandedWindows.Size(); ExWinNr++) 358 Expand(FindTreeItem(GetRootItem(), ExpandedWindows[ExWinNr])); 354 { 355 wxTreeItemId Result=FindTreeItem(GetRootItem(), ExpandedWindows[ExWinNr]); 356 357 if (Result.IsOk()) 358 Expand(Result); 359 } 359 360 360 361 Thaw();
