From 809fd2903fc38cac009a0e658f65c9f71bf3debe Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Fri, 8 Jun 2012 14:42:45 +0000 Subject: [PATCH] Two attempt to optimize the managment of the updates and focus changes in the glarea --- src/meshlab/glarea.cpp | 4 ++-- src/meshlab/layerDialog.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/meshlab/glarea.cpp b/src/meshlab/glarea.cpp index 35cce6341..b65802f98 100644 --- a/src/meshlab/glarea.cpp +++ b/src/meshlab/glarea.cpp @@ -780,8 +780,8 @@ void GLArea::keyPressEvent ( QKeyEvent * e ) void GLArea::mousePressEvent(QMouseEvent*e) { - e->accept(); - setFocus(); + e->accept(); + if(!this->hasFocus()) this->setFocus(); if(!isRaster() || isRaster()) { diff --git a/src/meshlab/layerDialog.cpp b/src/meshlab/layerDialog.cpp index fbe4cddd6..c6a954733 100644 --- a/src/meshlab/layerDialog.cpp +++ b/src/meshlab/layerDialog.cpp @@ -238,14 +238,14 @@ void LayerDialog::updateLog(GLLogStream &log) QString preFilter = "" ; QString post = ""; - + QString logText; foreach(logElem, logStringList){ - QString logText = logElem.second; + logText += logElem.second; if(logElem.first == GLLogStream::SYSTEM) logText = preSystem + logText + post; if(logElem.first == GLLogStream::WARNING) logText = preWarn + logText + post; if(logElem.first == GLLogStream::FILTER) logText = preFilter + logText + post; - ui->logPlainTextEdit->appendHtml(logText); } + ui->logPlainTextEdit->appendHtml(logText); } void LayerDialog::updateTable()