trying to fix the 2xEmit bug,
write directly mirrored to the image,
This commit is contained in:
@@ -100,6 +100,8 @@ void GeometryEngine::loadFile(const char* filePath)
|
||||
for(auto& it : *textureNames)
|
||||
loadTexture(path.c_str(), it.c_str());
|
||||
|
||||
loadTexture("", "");
|
||||
|
||||
emit requestUpdate();
|
||||
emit sendMessage("done..", 0);
|
||||
}
|
||||
@@ -114,12 +116,13 @@ void GeometryEngine::loadTexture(const char* filePath, const char* fileName)
|
||||
bool loadSuccess(false);
|
||||
QImage img;
|
||||
|
||||
//if (!strcmp(fileName, ""))
|
||||
//{
|
||||
// img = QImage(1, 1, QImage::Format_RGB32);
|
||||
// img.fill(Qt::red);
|
||||
//}
|
||||
//else
|
||||
if (!strcmp(fileName, ""))
|
||||
{
|
||||
loadSuccess = true;
|
||||
img = QImage(1, 1, QImage::Format_RGB32);
|
||||
img.fill(Qt::red);
|
||||
}
|
||||
else
|
||||
img = loadTga((std::string(filePath) + std::string(fileName)).c_str(), loadSuccess);
|
||||
|
||||
//TODO: emit if not successfull
|
||||
|
@@ -74,7 +74,7 @@ void MainWindow::aboutTool()
|
||||
dialog->exec();
|
||||
}
|
||||
|
||||
void MainWindow::showMessage(QString message, int severity)
|
||||
void MainWindow::printMessage(QString message, int severity)
|
||||
{
|
||||
if (severity < m_curSeverity)
|
||||
return;
|
||||
|
@@ -197,7 +197,7 @@ void OglViewerWidget::setConnections()
|
||||
connect(m_dataEngine, &GeometryEngine::requestResetView, this, &OglViewerWidget::resetView);
|
||||
connect(parentWidget(), SIGNAL(loadFile(const char*)), m_dataEngine, SLOT(loadFile(const char*)));
|
||||
connect(this, SIGNAL(loadFile(const char*)), m_dataEngine, SLOT(loadFile(const char*)));
|
||||
connect(m_dataEngine, SIGNAL(sendMessage(QString, int)), parentWidget(), SLOT(showMessage(QString, int)));
|
||||
connect(m_dataEngine, SIGNAL(sendMessage(QString, int)), parentWidget(), SLOT(printMessage(QString, int)));
|
||||
connect(m_dataEngine, SIGNAL(requestUpdate()), this, SLOT(update()));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user