aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-06-05 16:16:41 +0200
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-06-05 16:16:41 +0200
commitdc68dff538394de7ff0f1e12d079aed7dd919c1b (patch)
tree49a6b8ec69e049ae2ba94aec2b4b7bc8956aaf53
parent710fc4ffad6ca252ebf29825402d9d70d30bd41f (diff)
downloadqtmips-dc68dff538394de7ff0f1e12d079aed7dd919c1b.tar.gz
qtmips-dc68dff538394de7ff0f1e12d079aed7dd919c1b.tar.bz2
qtmips-dc68dff538394de7ff0f1e12d079aed7dd919c1b.zip
Editor start with already shown value in memory and program view.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
-rw-r--r--qtmips_gui/memorymodel.cpp2
-rw-r--r--qtmips_gui/programmodel.cpp2
2 files changed, 2 insertions, 2 deletions
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;