Skip to content

Commit f21ff61

Browse files
committed
Remove superfluous whitespace from Schema column in DB Structure view
In the Database Structure tab and the DB Schema pane, replace any sequence of whitespace characters by a single space character if the one-line Schema view is enabled. See issue sqlitebrowser#283.
1 parent f921815 commit f21ff61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DbStructureModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ QVariant DbStructureModel::data(const QModelIndex& index, int role) const
3737

3838
// Depending on the role either return the text or the icon
3939
if(role == Qt::DisplayRole)
40-
return PreferencesDialog::getSettingsValue("db", "hideschemalinebreaks").toBool() ? item->text(index.column()).replace("\n", " ") : item->text(index.column());
40+
return PreferencesDialog::getSettingsValue("db", "hideschemalinebreaks").toBool() ? item->text(index.column()).replace("\n", " ").simplified() : item->text(index.column());
4141
else if(role == Qt::ToolTipRole)
4242
return item->text(index.column()); // Don't modify the text when it's supposed to be shown in a tooltip
4343
else if(role == Qt::DecorationRole)

0 commit comments

Comments
 (0)