QTfrontend/drawmapscene.cpp
changeset 5040 c6cd873ac13a
parent 4976 088d40d8aba2
child 5108 b7483e29ea8c
equal deleted inserted replaced
5039:2376d5899ff9 5040:c6cd873ac13a
    84     emit pathChanged();
    84     emit pathChanged();
    85 }
    85 }
    86 
    86 
    87 void DrawMapScene::mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent)
    87 void DrawMapScene::mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent)
    88 {
    88 {
    89     Q_UNUSED(mouseEvent);
    89     QPainterPath path = m_currPath->path();
       
    90     path.lineTo(mouseEvent->scenePos());
       
    91     paths.first().append(mouseEvent->scenePos().toPoint());
       
    92     m_currPath->setPath(path);
    90 
    93 
    91     simplifyLast();
    94     simplifyLast();
    92 
    95 
    93     m_currPath = 0;
    96     m_currPath = 0;
    94 }
    97 }