aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/memorytableview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui/memorytableview.cpp')
-rw-r--r--qtmips_gui/memorytableview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/qtmips_gui/memorytableview.cpp b/qtmips_gui/memorytableview.cpp
index 9b5d0ba..18e1bb1 100644
--- a/qtmips_gui/memorytableview.cpp
+++ b/qtmips_gui/memorytableview.cpp
@@ -62,21 +62,21 @@ void MemoryTableView::adjustColumnCount() {
QString t = "";
t.fill(QChar('0'), m->cellSizeBytes() * 2);
/* t + = " C"; */
- int width1 = fm.width(t) + 1;
+ int width1 = fm.width(t);
if (width1 < fm.width("+99"))
width1 = fm.width("+99");
horizontalHeader()->setSectionResizeMode(1, QHeaderView::Fixed);
horizontalHeader()->resizeSection(1, width1);
- int w = verticalHeader()->width() + 8;
+ int w = verticalHeader()->width() + 4;
unsigned int cells;
width0 = columnWidth(0);
width1 = columnWidth(1);
w = width() - w - width0;
- if (w < width1) {
+ if (w < width1 + 2) {
cells = 1;
} else {
- cells = w / width1;
+ cells = w / (width1 + 2);
}
if (cells != m->cellsPerRow()) {
m->setCellsPerRow(cells);
@@ -167,7 +167,7 @@ void MemoryTableView::resizeEvent(QResizeEvent *event) {
}
}
-void MemoryTableView:: go_to_address(std::int32_t address) {
+void MemoryTableView:: go_to_address(std::uint32_t address) {
MemoryModel *m = dynamic_cast<MemoryModel*>(model());
int row;
if (m == nullptr)