From dc68dff538394de7ff0f1e12d079aed7dd919c1b Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Wed, 5 Jun 2019 16:16:41 +0200 Subject: Editor start with already shown value in memory and program view. Signed-off-by: Pavel Pisa --- qtmips_gui/memorymodel.cpp | 2 +- qtmips_gui/programmodel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'qtmips_gui') diff --git a/qtmips_gui/memorymodel.cpp b/qtmips_gui/memorymodel.cpp index c8a159c..329891e 100644 --- a/qtmips_gui/memorymodel.cpp +++ b/qtmips_gui/memorymodel.cpp @@ -76,7 +76,7 @@ QVariant MemoryModel::headerData(int section, Qt::Orientation orientation, int r } QVariant MemoryModel::data(const QModelIndex &index, int role) const { - if (role == Qt::DisplayRole) + if (role == Qt::DisplayRole || role == Qt::EditRole) { QString s, t; std::uint32_t address; diff --git a/qtmips_gui/programmodel.cpp b/qtmips_gui/programmodel.cpp index 9023b69..90e161b 100644 --- a/qtmips_gui/programmodel.cpp +++ b/qtmips_gui/programmodel.cpp @@ -79,7 +79,7 @@ QVariant ProgramModel::headerData(int section, Qt::Orientation orientation, int } QVariant ProgramModel::data(const QModelIndex &index, int role) const { - if (role == Qt::DisplayRole) + if (role == Qt::DisplayRole || role == Qt::EditRole) { QString s, t; std::uint32_t address; -- cgit v1.2.3