295 { |
295 { |
296 title += ": "; |
296 title += ": "; |
297 title += m_currentDocument->getDisplayName(); |
297 title += m_currentDocument->getDisplayName(); |
298 |
298 |
299 if (m_currentDocument->size() > 0 and |
299 if (m_currentDocument->size() > 0 and |
300 m_currentDocument->getObject(0)->type() == OBJ_Comment) |
300 m_currentDocument->getObject(0)->type() == LDObjectType::Comment) |
301 { |
301 { |
302 // Append title |
302 // Append title |
303 LDComment* comm = static_cast <LDComment*> (m_currentDocument->getObject (0)); |
303 LDComment* comm = static_cast <LDComment*> (m_currentDocument->getObject (0)); |
304 title += format (": %1", comm->text()); |
304 title += format (": %1", comm->text()); |
305 } |
305 } |
367 font.setItalic (true); |
367 font.setItalic (true); |
368 item->setFont (font); |
368 item->setFont (font); |
369 } |
369 } |
370 |
370 |
371 // Color gibberish orange on red so it stands out. |
371 // Color gibberish orange on red so it stands out. |
372 if (obj->type() == OBJ_Error) |
372 if (obj->type() == LDObjectType::Error) |
373 { |
373 { |
374 item->setBackground (QColor ("#AA0000")); |
374 item->setBackground (QColor ("#AA0000")); |
375 item->setForeground (QColor ("#FFAA00")); |
375 item->setForeground (QColor ("#FFAA00")); |
376 } |
376 } |
377 else if (m_config.colorizeObjectsList() |
377 else if (m_config.colorizeObjectsList() |
614 |
614 |
615 bool hasSubfiles = false; |
615 bool hasSubfiles = false; |
616 |
616 |
617 for (LDObject* obj : selectedObjects()) |
617 for (LDObject* obj : selectedObjects()) |
618 { |
618 { |
619 if (obj->type() == OBJ_SubfileReference) |
619 if (obj->type() == LDObjectType::SubfileReference) |
620 { |
620 { |
621 hasSubfiles = true; |
621 hasSubfiles = true; |
622 break; |
622 break; |
623 } |
623 } |
624 } |
624 } |
625 |
625 |
626 QMenu* contextMenu = new QMenu; |
626 QMenu* contextMenu = new QMenu; |
627 |
627 |
628 if (single and singleObj->type() != OBJ_Empty) |
628 if (single and singleObj->type() != LDObjectType::Empty) |
629 { |
629 { |
630 contextMenu->addAction (ui.actionEdit); |
630 contextMenu->addAction (ui.actionEdit); |
631 contextMenu->addSeparator(); |
631 contextMenu->addSeparator(); |
632 } |
632 } |
633 |
633 |
660 { |
660 { |
661 contextMenu->addSeparator(); |
661 contextMenu->addSeparator(); |
662 contextMenu->addAction (ui.actionSubfileSelection); |
662 contextMenu->addAction (ui.actionSubfileSelection); |
663 } |
663 } |
664 |
664 |
665 if (renderer()->camera() != FreeCamera) |
665 if (renderer()->camera() != Camera::Free) |
666 { |
666 { |
667 contextMenu->addSeparator(); |
667 contextMenu->addSeparator(); |
668 contextMenu->addAction (ui.actionSetDrawDepth); |
668 contextMenu->addAction (ui.actionSetDrawDepth); |
669 } |
669 } |
670 |
670 |