Fix warnings
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user