diff --git a/README.md b/README.md index 140ffd3..1f3ef97 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# LimeReport v1.5.35 [![Build Status](https://api.travis-ci.org/fralx/LimeReport.svg?branch=master)](https://travis-ci.org/fralx/LimeReport) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) +# LimeReport v1.5.35 [![Build Status](https://api.travis-ci.org/fralx/LimeReport.svg?branch=master)](https://travis-ci.org/fralx/LimeReport) [![Build status](https://ci.appveyor.com/api/projects/status/wna5429pix7ilcmo/branch/master?svg=true)](https://ci.appveyor.com/project/fralx/limereport/branch/master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) ## Official LimeReport web site [http://limereport.ru](http://limereport.ru) diff --git a/common.pri b/common.pri index e9771a3..1172b84 100644 --- a/common.pri +++ b/common.pri @@ -134,7 +134,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 73 +LIMEREPORT_VERSION_RELEASE = 76 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 5df12fd..1f05f32 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -85,7 +85,9 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q m_fillTransparentInDesignMode(true), m_unitType(Millimeters), m_itemGeometryLocked(false), - m_isChangingPos(false) + m_isChangingPos(false), + m_isMoveable(false) + { setGeometry(QRectF(0, 0, m_width, m_height)); if (BaseDesignIntf *item = dynamic_cast(parent)) { @@ -387,6 +389,10 @@ void BaseDesignIntf::setFixedPos(bool fixedPos) m_fixedPos = fixedPos; } +void BaseDesignIntf::onChangeGeometryTimeOut(){ + m_isMoveable = true; +} + void BaseDesignIntf::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::LeftButton) { @@ -396,6 +402,8 @@ void BaseDesignIntf::mousePressEvent(QGraphicsSceneMouseEvent *event) m_oldGeometry = geometry(); QGraphicsItem::mousePressEvent(event); emit(itemSelected(this)); + m_isMoveable = false; + m_timer.singleShot(200, this, SLOT(onChangeGeometryTimeOut())); } else QGraphicsItem::mousePressEvent(event); } @@ -524,6 +532,7 @@ void BaseDesignIntf::hoverEnterEvent(QGraphicsSceneHoverEvent /**event*/) void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { + if (!m_isMoveable) return; if (!isSelected()){ QGraphicsItem::mouseMoveEvent(event); return; diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 00fc807..08ab8ed 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -403,6 +403,9 @@ private: Qt::CursorShape getPossibleCursor(int cursorFlags); void updatePossibleDirectionFlags(); +private slots: + void onChangeGeometryTimeOut(); + private: QPointF m_startPos; int m_resizeHandleSize; @@ -463,6 +466,9 @@ private: UnitType m_unitType; bool m_itemGeometryLocked; bool m_isChangingPos; + bool m_isMoveable; + QTimer m_timer; + signals: void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry); void posChanging(QObject* object, QPointF newPos, QPointF oldPos);