Minor change

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4077 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-07-27 21:47:41 +00:00
parent bb213e7146
commit 8acbc625da
4 changed files with 23 additions and 32 deletions

View File

@@ -80,7 +80,7 @@ bool DVEventAddShape::mousePressEvent(QMouseEvent *event)
}
//If current item isn't a polyline, add it with an undo command
if (m_shape_type != QetShapeItem::Polyline)
if (m_shape_type != QetShapeItem::Polygon)
{
m_shape_item -> setP2 (pos);
m_diagram -> undoStack().push (new AddItemCommand<QetShapeItem *> (m_shape_item, m_diagram));
@@ -139,7 +139,7 @@ bool DVEventAddShape::mouseReleaseEvent(QMouseEvent *event)
if (m_shape_item)
{
//Shape is a polyline and have three points or more we just remove the last point
if (m_shape_type == QetShapeItem::Polyline && (m_shape_item -> pointsCount() >= 3) )
if (m_shape_type == QetShapeItem::Polygon && (m_shape_item -> pointsCount() >= 3) )
{
m_shape_item -> removePoints();
@@ -175,7 +175,7 @@ bool DVEventAddShape::mouseReleaseEvent(QMouseEvent *event)
bool DVEventAddShape::mouseDoubleClickEvent(QMouseEvent *event)
{
//If current item is a polyline, add it with an undo command
if (m_shape_item && m_shape_type == QetShapeItem::Polyline && event -> button() == Qt::LeftButton)
if (m_shape_item && m_shape_type == QetShapeItem::Polygon && event -> button() == Qt::LeftButton)
{
//<double clic is used to finish polyline, but they also add two points at the same pos
//<(double clic is a double press event), so we remove the last point of polyline