Fix white balance uninitialized at start

This commit is contained in:
2023-01-11 00:49:26 +01:00
parent abc813ddbb
commit 304cd33f34
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -103,6 +103,7 @@ void ImageWidget::setImage(std::shared_ptr<RawImage> image, int index)
m_imgWidth = image->width(); m_imgWidth = image->width();
m_imgHeight = image->height(); m_imgHeight = image->height();
m_currentImg = index; m_currentImg = index;
m_whiteBalance[0] = m_whiteBalance[1] = m_whiteBalance[2] = 1.0f;
if(!m_image)return; if(!m_image)return;
+1 -1
View File
@@ -52,7 +52,7 @@ class ImageWidget : public QOpenGLWidget
float m_range; float m_range;
float m_dx, m_dy; float m_dx, m_dy;
float m_scale; float m_scale;
float m_whiteBalance[3]; float m_whiteBalance[3] = {1.0f, 1.0f, 1.0f};
bool m_blockRepaint; bool m_blockRepaint;
bool m_bwImg; bool m_bwImg;
bool m_invert; bool m_invert;