mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 10:20:17 -06:00
Load the full cell data when trying to edit the cell content
In 11bff0ded8 a settings option was
introduced in order to limit the number of characters loaded into each
cell in the Browse Data tab.
However, when editing the cell you wouldn't see the full data, i.e.
rendering the data incomplete and/or cropping it when it's being edited
anyway. This commit fixes this behaviour: when editing a cell (either
in-line or using the edit dialog/dock) the full data for this particular
cell is loaded and shown.
This commit is contained in:
@@ -221,12 +221,15 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
|
||||
const_cast<SqliteTableModel*>(this)->fetchMore(); // Nothing evil to see here, move along
|
||||
|
||||
if(role == Qt::DisplayRole && m_data.at(index.row()).at(index.column()).isNull())
|
||||
{
|
||||
return Settings::getSettingsValue("databrowser", "null_text").toString();
|
||||
else if(role == Qt::DisplayRole && isBinary(index))
|
||||
} else if(role == Qt::DisplayRole && isBinary(index)) {
|
||||
return "BLOB";
|
||||
else {
|
||||
} else if(role == Qt::DisplayRole) {
|
||||
int limit = Settings::getSettingsValue("databrowser", "symbol_limit").toInt();
|
||||
return decode(m_data.at(index.row()).at(index.column()).left(limit));
|
||||
} else {
|
||||
return decode(m_data.at(index.row()).at(index.column()));
|
||||
}
|
||||
} else if(role == Qt::FontRole) {
|
||||
QFont font;
|
||||
|
||||
Reference in New Issue
Block a user