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) { if (processed) {
return true; 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,6 +1536,7 @@ QPointF SkeletonGraphicsWidget::scenePosFromUnified(QPointF pos)
bool SkeletonGraphicsWidget::mouseDoubleClick(QMouseEvent* event) bool SkeletonGraphicsWidget::mouseDoubleClick(QMouseEvent* event)
{ {
if (m_hoveredNodeItem || m_hoveredEdgeItem) { if (m_hoveredNodeItem || m_hoveredEdgeItem) {
if (Document::EditMode::Select == m_document->editMode)
selectPartAll(); selectPartAll();
return true; return true;
} }

View File

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