aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/programmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui/programmodel.cpp')
-rw-r--r--qtmips_gui/programmodel.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/qtmips_gui/programmodel.cpp b/qtmips_gui/programmodel.cpp
index 76473a8..838c058 100644
--- a/qtmips_gui/programmodel.cpp
+++ b/qtmips_gui/programmodel.cpp
@@ -167,11 +167,7 @@ void ProgramModel::check_for_updates() {
update_all();
}
-bool ProgramModel::adjustRowAndOffset(int &row, int optimal_row, std::uint32_t address) {
- if (optimal_row < rowCount() / 8)
- optimal_row = rowCount() / 8;
- if (optimal_row >= rowCount() - rowCount() / 8)
- optimal_row = rowCount() - rowCount() / 8;
+bool ProgramModel::adjustRowAndOffset(int &row, std::uint32_t address) {
row = rowCount() / 2;
address -= address % cellSizeBytes();
std::uint32_t row_bytes = cellSizeBytes();