diff --git a/src/PreferencesDialog.cpp b/src/PreferencesDialog.cpp
index 5d2a6b87..9dbce7cd 100644
--- a/src/PreferencesDialog.cpp
+++ b/src/PreferencesDialog.cpp
@@ -88,6 +88,7 @@ void PreferencesDialog::loadSettings()
loadColorSetting(ui->fr_bin_fg, "bin_fg");
loadColorSetting(ui->fr_bin_bg, "bin_bg");
+ ui->spinSymbolLimit->setValue(getSettingsValue("databrowser", "symbol_limit").toInt());
ui->txtNull->setText(getSettingsValue("databrowser", "null_text").toString());
ui->editFilterEscape->setText(getSettingsValue("databrowser", "filter_escape").toString());
ui->spinFilterDelay->setValue(getSettingsValue("databrowser", "filter_delay").toInt());
@@ -147,6 +148,7 @@ void PreferencesDialog::saveSettings()
saveColorSetting(ui->fr_reg_bg, "reg_bg");
saveColorSetting(ui->fr_bin_fg, "bin_fg");
saveColorSetting(ui->fr_bin_bg, "bin_bg");
+ setSettingsValue("databrowser", "symbol_limit", ui->spinSymbolLimit->value());
setSettingsValue("databrowser", "null_text", ui->txtNull->text());
setSettingsValue("databrowser", "filter_escape", ui->editFilterEscape->text());
setSettingsValue("databrowser", "filter_delay", ui->spinFilterDelay->value());
@@ -300,6 +302,8 @@ QVariant PreferencesDialog::getSettingsDefaultValue(const QString& group, const
return QFont().defaultFamily();
if(name == "fontsize")
return 10;
+ if(name == "symbol_limit")
+ return 5000;
if(name == "null_text")
return "NULL";
if(name == "filter_escape")
diff --git a/src/PreferencesDialog.ui b/src/PreferencesDialog.ui
index b7e01139..4a9cfff3 100644
--- a/src/PreferencesDialog.ui
+++ b/src/PreferencesDialog.ui
@@ -339,6 +339,38 @@
+ -
+
+
+ Content
+
+
+
-
+
+
+ Symbol limit in cell
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ 1000
+
+
+ 20000
+
+
+
+
+
+
-
diff --git a/src/sqlitetablemodel.cpp b/src/sqlitetablemodel.cpp
index df338930..1e55f846 100644
--- a/src/sqlitetablemodel.cpp
+++ b/src/sqlitetablemodel.cpp
@@ -224,8 +224,10 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
return PreferencesDialog::getSettingsValue("databrowser", "null_text").toString();
else if(role == Qt::DisplayRole && isBinary(index))
return "BLOB";
- else
- return decode(m_data.at(index.row()).at(index.column()));
+ else {
+ int limit = PreferencesDialog::getSettingsValue("databrowser", "symbol_limit").toInt();
+ return decode(m_data.at(index.row()).at(index.column()).left(limit));
+ }
} else if(role == Qt::FontRole) {
QFont font;
if(m_data.at(index.row()).at(index.column()).isNull() || isBinary(index))