Commit 3cf7bfca authored by Timothée Giet's avatar Timothée Giet

Revert "Do not move frame when drag occurs on rectangle at end of frame sequence."

This reverts commit 41f69bb49bd5b4789c2fd53e57815e55c4100a6a.
parent 25e99e1a
......@@ -60,13 +60,6 @@ void KisAnimationFrame::mouseMoveEvent(QMouseEvent *event)
m_dragging = true;
if(this->width() != 10) {
if(m_localMousePressStartPoint > this->width() - 10 && m_localMousePressStartPoint < this->width()) {
qDebug() << "Entending the frame";
return;
}
}
int x = event->globalX();
int displacement = x - m_mousePressStartPoint;
......@@ -77,10 +70,7 @@ void KisAnimationFrame::mouseMoveEvent(QMouseEvent *event)
void KisAnimationFrame::mousePressEvent(QMouseEvent *event)
{
m_mousePressed = true;
m_mousePressStartPoint = event->globalX();
m_localMousePressStartPoint = event->x();
m_startPoint = this->geometry().x();
}
......@@ -88,13 +78,12 @@ void KisAnimationFrame::mouseReleaseEvent(QMouseEvent *event)
{
m_mousePressed = false;
m_mousePressEndPoint = event->globalX();
m_localMousePressEndPoint = event->x();
if(m_dragging) {
m_dragging = false;
m_mousePressEndPoint = event->globalX();
int x = (this->geometry().x() / 10);
x *= 10;
......
......@@ -66,18 +66,11 @@ public:
private:
int m_type;
int m_width;
KisLayerContents* m_parent;
bool m_mousePressed;
int m_mousePressStartPoint;
int m_mousePressEndPoint;
int m_localMousePressStartPoint;
int m_localMousePressEndPoint;
int m_startPoint;
bool m_mousePressed;
bool m_dragging;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment