Fix warnings

This commit is contained in:
2023-12-20 11:31:08 +01:00
parent eaf2c7094b
commit e5be04926b
2 changed files with 25 additions and 19 deletions
+7 -3
View File
@@ -49,6 +49,10 @@ RawImageType getRawImageType(const RawImage *img)
else
type.textureFormat = QOpenGLTexture::R32F;
type.dataType = QOpenGLTexture::Float32;
break;
default:
qWarning() << "Invalid format" << img->type();
break;
}
if(img->channels() >= 3)
@@ -559,7 +563,7 @@ void ImageWidget::mousePressEvent(QMouseEvent *event)
else
{
if(event->button() == Qt::LeftButton)
m_lastPos = event->localPos();
m_lastPos = event->position();
}
}
@@ -571,8 +575,8 @@ void ImageWidget::mouseMoveEvent(QMouseEvent *event)
}
else if(!m_lastPos.isNull())
{
QPointF off = event->localPos() - m_lastPos;
m_lastPos = event->localPos();
QPointF off = event->position() - m_lastPos;
m_lastPos = event->position();
setOffset(m_dx - off.x(), m_dy - off.y());
return;
}