303 |
304 |
304 if (!bIsSelected) |
305 if (!bIsSelected) |
305 continue; // Was not selected |
306 continue; // Was not selected |
306 |
307 |
307 static_cast<LDQuad*> (obj)->splitToTriangles (); |
308 static_cast<LDQuad*> (obj)->splitToTriangles (); |
308 } |
309 i++;// Skip past the second triangle |
309 |
310 } |
|
311 |
|
312 printf ("build obj list\n"); |
|
313 buildObjList (); |
|
314 |
|
315 printf ("refresh teh renderer\n"); |
310 R->hardRefresh (); |
316 R->hardRefresh (); |
311 buildObjList (); |
|
312 } |
317 } |
313 |
318 |
314 void LDForgeWindow::slot_setContents () { |
319 void LDForgeWindow::slot_setContents () { |
315 if (qObjList->selectedItems().size() != 1) |
320 if (qObjList->selectedItems().size() != 1) |
316 return; |
321 return; |
375 |
380 |
376 QList<QTreeWidgetItem*> qaItems; |
381 QList<QTreeWidgetItem*> qaItems; |
377 |
382 |
378 qObjList->clear (); |
383 qObjList->clear (); |
379 |
384 |
380 for (ushort i = 0; i < g_CurrentFile->objects.size(); ++i) { |
385 for (ulong i = 0; i < g_CurrentFile->objects.size(); ++i) { |
381 LDObject* obj = g_CurrentFile->objects[i]; |
386 LDObject* obj = g_CurrentFile->objects[i]; |
|
387 printf ("%lu: %p\n", i, obj); |
382 |
388 |
383 str zText; |
389 str zText; |
384 switch (obj->getType ()) { |
390 switch (obj->getType ()) { |
385 case OBJ_Comment: |
391 case OBJ_Comment: |
386 zText = static_cast<LDComment*> (obj)->zText.chars(); |
392 zText = static_cast<LDComment*> (obj)->zText.chars(); |
461 } |
467 } |
462 |
468 |
463 void LDForgeWindow::slot_selectionChanged () { |
469 void LDForgeWindow::slot_selectionChanged () { |
464 // If the selection isn't 1 exact, disable setting contents |
470 // If the selection isn't 1 exact, disable setting contents |
465 qAct_setContents->setEnabled (qObjList->selectedItems().size() == 1); |
471 qAct_setContents->setEnabled (qObjList->selectedItems().size() == 1); |
|
472 |
|
473 // If we have no selection, disable splitting quads |
|
474 qAct_splitQuads->setEnabled (qObjList->selectedItems().size() > 0); |
466 } |
475 } |
467 |
476 |
468 // ============================================================================= |
477 // ============================================================================= |
469 // ulong getInsertionPoint () |
478 // ulong getInsertionPoint () |
470 // |
479 // |