bool SelectNodesOP::OnMouseLeftUp(int x, int y) { if (DrawRectangleOP::OnMouseLeftUp(x, y)) return true; if (m_first_pos.IsValid()) { sm::rect rect(m_first_pos, m_stage->TransPosScrToProj(x, y)); m_shape_impl->TraverseShapes(RectQueryVisitor(rect, m_node_selection), ee::DT_SELECTABLE); m_first_pos.MakeInvalid(); } return false; }
bool SelectNodesOP::onMouseLeftUp(int x, int y) { if (DrawRectangleOP::onMouseLeftUp(x, y)) return true; if (m_firstPos.isValid()) { Rect rect(m_firstPos, m_editPanel->transPosScreenToProject(x, y)); m_shapeImpl->traverseShapes(RectQueryVisitor(rect, m_nodeSelection), e_selectable); m_firstPos.setInvalid(); } return false; }