fixed debug textarea not updating and updated qtutils

This commit is contained in:
Anselme 2016-09-18 22:16:51 +02:00
parent 3ec9f35fd6
commit 4473aee625
3 changed files with 3 additions and 4 deletions

View File

@ -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();
}

View File

@ -26,7 +26,6 @@ private:
int m_simSpeed;
bool m_simSpeedChanged;
bool m_paused;
bool m_debugEnabled;
Coord m_debugCursorPos;
void updateDebugMessage();

View File

@ -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);