Skip to content

Commit

Permalink
quick fix to the glLog Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cignoni committed Oct 1, 2024
1 parent e483b5e commit 4fac464
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/meshlab/layerDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,14 +653,16 @@ 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";
QString prefilterColor = "black";
#endif
QString preWarn = "<font face=\"courier\" size=3 color=\"" + warningColor +"\"> Warning: " ;
QString preSystem = "<font face=\"courier\" size=2 color=\"" + presystemColor +"\">" ;
QString preFilter = "<font face=\"courier\" size=2 color=\"" + prefilterColor + "\">" ;
QString preFilter = "<font face=\"courier\" size=2 color=\"" + prefilterColor + "\"> &nbsp;&nbsp;" ;

QString post = "</font>";
QString logText;
Expand All @@ -672,9 +674,10 @@ void LayerDialog::updateLog(GLLogStream &log)
logText = preWarn + logText + post;
if(logElem.first == GLLogStream::FILTER)
logText = preFilter + logText + post;
logText += "<BR>";
// logText += "<BR>";
}
ui->logPlainTextEdit->appendHtml(logText);
if(!logText.isEmpty())
ui->logPlainTextEdit->appendHtml(logText);
log.clear();
}

Expand Down
2 changes: 1 addition & 1 deletion src/meshlab/mainwindow_RunTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4fac464

Please sign in to comment.