mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-24 04:50:21 -06:00
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 #283.
This commit is contained in:
@@ -37,7 +37,7 @@ QVariant DbStructureModel::data(const QModelIndex& index, int role) const
|
||||
|
||||
// Depending on the role either return the text or the icon
|
||||
if(role == Qt::DisplayRole)
|
||||
return PreferencesDialog::getSettingsValue("db", "hideschemalinebreaks").toBool() ? item->text(index.column()).replace("\n", " ") : item->text(index.column());
|
||||
return PreferencesDialog::getSettingsValue("db", "hideschemalinebreaks").toBool() ? item->text(index.column()).replace("\n", " ").simplified() : item->text(index.column());
|
||||
else if(role == Qt::ToolTipRole)
|
||||
return item->text(index.column()); // Don't modify the text when it's supposed to be shown in a tooltip
|
||||
else if(role == Qt::DecorationRole)
|
||||
|
||||
Reference in New Issue
Block a user