Add shortcut 'W' for toggling wireframe.

master
Jeremy Hu 2019-02-23 10:11:56 +09:30
parent b2fdb7f4e8
commit b86837b4b0
3 changed files with 6 additions and 0 deletions

View File

@ -724,6 +724,10 @@ DocumentWindow::DocumentWindow() :
connect(m_document, &Document::editModeChanged, graphicsWidget, &SkeletonGraphicsWidget::editModeChanged);
connect(graphicsWidget, &SkeletonGraphicsWidget::shortcutToggleWireframe, [=]() {
m_modelRenderWidget->toggleWireframe();
});
connect(graphicsWidget, &SkeletonGraphicsWidget::zoomRenderedModelBy, m_modelRenderWidget, &ModelWidget::zoom);
connect(graphicsWidget, &SkeletonGraphicsWidget::addNode, m_document, &Document::addNode);

View File

@ -45,4 +45,5 @@ void initShortCuts(QWidget *widget, SkeletonGraphicsWidget *graphicsWidget)
defineKey(Qt::Key_M, &SkeletonGraphicsWidget::shortcutXmirrorOnOrOffSelectedPart);
defineKey(Qt::Key_B, &SkeletonGraphicsWidget::shortcutSubdivedOrNotSelectedPart);
defineKey(Qt::Key_U, &SkeletonGraphicsWidget::shortcutRoundEndOrNotSelectedPart);
defineKey(Qt::Key_W, &SkeletonGraphicsWidget::shortcutToggleWireframe);
}

View File

@ -385,6 +385,7 @@ signals:
void switchChainSide(std::set<QUuid> nodeIds);
void enableAllPositionRelatedLocks();
void disableAllPositionRelatedLocks();
void shortcutToggleWireframe();
public:
SkeletonGraphicsWidget(const SkeletonDocument *document);
std::map<QUuid, std::pair<SkeletonGraphicsNodeItem *, SkeletonGraphicsNodeItem *>> nodeItemMap;