Fix double click to select all

master
Jeremy HU 2022-11-16 22:54:09 +11:00
parent 12e7eacea2
commit cd963fa87d
2 changed files with 8 additions and 1 deletions

View File

@ -1485,6 +1485,11 @@ bool SkeletonGraphicsWidget::mousePress(QMouseEvent* event)
if (processed) {
return true;
}
} else if (Document::EditMode::Pick == m_document->editMode) {
if (m_hoveredNodeItem) {
dust3dDebug << "nodePicked:" << m_hoveredNodeItem->id().toString();
emit nodePicked(m_hoveredNodeItem->id());
}
}
}
@ -1531,7 +1536,8 @@ QPointF SkeletonGraphicsWidget::scenePosFromUnified(QPointF pos)
bool SkeletonGraphicsWidget::mouseDoubleClick(QMouseEvent* event)
{
if (m_hoveredNodeItem || m_hoveredEdgeItem) {
selectPartAll();
if (Document::EditMode::Select == m_document->editMode)
selectPartAll();
return true;
}
if (QGuiApplication::queryKeyboardModifiers().testFlag(Qt::ControlModifier)) {

View File

@ -76,6 +76,7 @@ signals:
void shortcutToggleFlatShading();
void shortcutToggleRotation();
void loadedTurnaroundImageChanged();
void nodePicked(const dust3d::Uuid& nodeId);
public:
SkeletonGraphicsWidget(const Document* document);