From 196de4f009bfa9ff66b4d71727550373120ea88b Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Tue, 6 Apr 2021 12:07:01 +0200 Subject: [PATCH] fix #140 --- src/meshlab/layerDialog.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/meshlab/layerDialog.cpp b/src/meshlab/layerDialog.cpp index 5ac188a0b..2fee5cd83 100644 --- a/src/meshlab/layerDialog.cpp +++ b/src/meshlab/layerDialog.cpp @@ -945,7 +945,14 @@ void LayerDialog::updatePerMeshItemSelectionStatus() if(item->_meshid == mm->id()) { ui->meshTreeWidget->setCurrentItem(item); _tabw->updatePerMeshRenderingAction(item->_rendertoolbar->getRenderingActions()); - _renderingtabcontainer->setTitle(mm->label()); + QString meshLabel = mm->label(); + if (meshLabel.size() > 30){ + QString fin = meshLabel.right(6); + meshLabel.truncate(20); + meshLabel += "..."; + meshLabel += fin; + } + _renderingtabcontainer->setTitle(meshLabel); updateDecoratorParsView(); } } @@ -1164,6 +1171,12 @@ MeshTreeWidgetItem::MeshTreeWidgetItem(MeshModel* meshmodel,QTreeWidget* tree,ML QFileInfo inf = meshmodel->label(); QString meshName = inf.completeBaseName(); + if (meshName.size() > 30){ + QString fin = meshName.right(6); + meshName.truncate(20); + meshName += "..."; + meshName += fin; + } if (meshmodel->meshModified()) meshName += " *"; if (_rendertoolbar != NULL)