diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b0dfa93..33121e0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -94,7 +94,7 @@ void MainWindow::updateSimu() ui->drawWidget->updateDudesBehavior(); ui->drawWidget->setFlatSphere(ui->flatSphereSlider->value()); ui->drawWidget->setSurfaceRatio(ui->surfaceRatioSlider->value()); - if(m_debugEnabled) + if(ui->debugGroupBox->isVisible()) updateDebugMessage(); ui->drawWidget->repaint(); } diff --git a/src/mainwindow.h b/src/mainwindow.h index c61957f..2ed940f 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -26,7 +26,6 @@ private: int m_simSpeed; bool m_simSpeedChanged; bool m_paused; - bool m_debugEnabled; Coord m_debugCursorPos; void updateDebugMessage(); diff --git a/src/qtutils.cpp b/src/qtutils.cpp index 797dab9..c91178a 100644 --- a/src/qtutils.cpp +++ b/src/qtutils.cpp @@ -23,7 +23,7 @@ EditorImage* QtUtils::loadImage(const QString &filename) img->width = glImage.width(); img->height = glImage.height(); img->allocate(glImage.byteCount()); - memcpy(img->pixels, glImage.bits(), glImage.byteCount()); + memcpy(img->pixels.data(), glImage.bits(), glImage.byteCount()); return img; } @@ -44,7 +44,7 @@ EditorImage::EditorImage(int myWidth, int myHeight, float frequency, float ampli depth = 32; Image::allocate(width*height*depth); - GLubyte *data = (GLubyte*)Image::pixels; + GLubyte *data = (GLubyte*)Image::pixels.data(); float xFactor = 1.0f / (width - 1); float yFactor = 1.0f / (height - 1);