From 4fac4642a409ba175bbce41a61936a4d0d47b5fa Mon Sep 17 00:00:00 2001 From: Paolo Cignoni Date: Tue, 1 Oct 2024 13:12:32 +0200 Subject: [PATCH] quick fix to the glLog Formatting --- src/meshlab/layerDialog.cpp | 9 ++++++--- src/meshlab/mainwindow_RunTime.cpp | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/meshlab/layerDialog.cpp b/src/meshlab/layerDialog.cpp index f79208e79..9bae3907f 100644 --- a/src/meshlab/layerDialog.cpp +++ b/src/meshlab/layerDialog.cpp @@ -653,6 +653,8 @@ void LayerDialog::updateLog(GLLogStream &log) QString warningColor = this->palette().color(QPalette::HighlightedText).name(); QString presystemColor = this->palette().color(QPalette::HighlightedText).name(); QString prefilterColor = this->palette().color(QPalette::Text).name(); + if(prefilterColor==presystemColor) presystemColor = "grey"; + if(prefilterColor==warningColor) warningColor = "red"; #else QString warningColor = "red"; QString presystemColor = "grey"; @@ -660,7 +662,7 @@ void LayerDialog::updateLog(GLLogStream &log) #endif QString preWarn = " Warning: " ; QString preSystem = "" ; - QString preFilter = "" ; + QString preFilter = "   " ; QString post = ""; QString logText; @@ -672,9 +674,10 @@ void LayerDialog::updateLog(GLLogStream &log) logText = preWarn + logText + post; if(logElem.first == GLLogStream::FILTER) logText = preFilter + logText + post; - logText += "
"; + // logText += "
"; } - ui->logPlainTextEdit->appendHtml(logText); + if(!logText.isEmpty()) + ui->logPlainTextEdit->appendHtml(logText); log.clear(); } diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index 0700472a5..edd1bbcc8 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -1098,7 +1098,7 @@ void MainWindow::executeFilter( // (5) Apply post filter actions (e.g. recompute non updated stuff if needed) - meshDoc()->Log.logf(GLLogStream::SYSTEM,"Applied filter %s in %i msec",qUtf8Printable(action->text()),tt.elapsed()); + meshDoc()->Log.logf(GLLogStream::SYSTEM,"Applied filter: %s in %i msec",qUtf8Printable(action->text()),tt.elapsed()); if (meshDoc()->mm() != NULL) meshDoc()->mm()->setMeshModified(); MainWindow::globalStatusBar()->showMessage("Filter successfully completed...",2000);