# HG changeset patch # User Chris Cannam # Date 1383580085 0 # Node ID d8bd193ad17dfac2e50090969a217461441ea70c # Parent b5d3dea6d869898c0996d7aa2f8b03747ebb3926 Abbreviate very long text elements in csv file format dialog diff -r b5d3dea6d869 -r d8bd193ad17d widgets/CSVFormatDialog.cpp --- a/widgets/CSVFormatDialog.cpp Wed Oct 09 14:55:49 2013 +0100 +++ b/widgets/CSVFormatDialog.cpp Mon Nov 04 15:48:05 2013 +0000 @@ -17,6 +17,8 @@ #include "layer/LayerFactory.h" +#include "TextAbbrev.h" + #include #include #include @@ -96,7 +98,8 @@ for (int j = 0; j < example.size() && j < 6; ++j) { QLabel *label = new QLabel; label->setTextFormat(Qt::PlainText); - label->setText(example[j][i]); + QString text = TextAbbrev::abbreviate(example[j][i], 35); + label->setText(text); label->setFont(fp); label->setPalette(palette); label->setIndent(8);