aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-04-08 14:15:33 +0200
committerKarel Kočí <cynerd@email.cz>2018-04-08 14:15:33 +0200
commit376400e4b88ee4b6ca284a8dfce47c95921545fa (patch)
treefda4ba49ebb0d72bd7f5855a36cb99e92f172400
parentec54415ae4299aede92ba3526aadfc6986f17e82 (diff)
downloadqtmips-376400e4b88ee4b6ca284a8dfce47c95921545fa.tar.gz
qtmips-376400e4b88ee4b6ca284a8dfce47c95921545fa.tar.bz2
qtmips-376400e4b88ee4b6ca284a8dfce47c95921545fa.zip
Don't insert another column when statictable widget is not wider
This makes static table widget to have only one column until it's wider then higher.
-rw-r--r--TODO.md5
-rw-r--r--qtmips_gui/statictable.cpp2
2 files changed, 1 insertions, 6 deletions
diff --git a/TODO.md b/TODO.md
index 3dc1fbc..31d32c4 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,4 +1,3 @@
-* Firm endianity support
* Full unprivileged instructions support
* Windows support
* On cache also allow calculate what time it would take with stalls.
@@ -10,10 +9,6 @@
add new column.
* Optimize MemoryView (it calls layout size and do_layout a lot)
* Use background color to mark program and data in cache
-* Do not use multiple rows for program and memory unless there is more horizontal
- space then vertical
* There seems to be some problem with layout recalculation when dock is pulled
out of main window. When it's resized then it's immediately correctly
recalculated.
-* Implement tests for forwarding and stall in pipecore (check things like if we
- nop is correctly inserted, and if forward correctly works and so on).
diff --git a/qtmips_gui/statictable.cpp b/qtmips_gui/statictable.cpp
index 594476b..c989491 100644
--- a/qtmips_gui/statictable.cpp
+++ b/qtmips_gui/statictable.cpp
@@ -148,7 +148,7 @@ int StaticTableLayout::real_row_height() {
}
int StaticTableLayout::layout_count_approx(const QRect &rect) const {
- if (items.size() <= 0)
+ if (items.size() <= 0 || rect.width() < rect.height())
return 1;
// Note: for some reason (probably optimalisation) when qlabel is not visible it reports 0 size. So we have to found at least one that is visible
int vis = 0;