Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Add fixes for issues #199 and #200 to develop branch #201

Closed
wants to merge 18 commits into from
Closed

Conversation

laksono
Copy link
Member

@laksono laksono commented May 17, 2022

Add fixes for issues #199 and #200 to develop branch

la5 and others added 18 commits May 16, 2022 12:24
The root cause of this is because the scroll bar only appears if the
metric columns are also visible.
To ensure the scroll bar is visible, the width of tree column needs to
be adjusted to allow at least one metric column is visible.
The root cause is because the flat id (or struct id) of inlines are the
same for different callers.
Since inlines have the same line scope flat id (because they have the
same file and line number), the viewer has to manually add the caller
(its parent) as part of the flat id.
Since inlines flat id is the same for all calls, it's critical to
include the ancestor's flat id as part of the flat id to avoid
duplicates between different callers.
Update:
- The previous fix doesn't cater high def screen (mac book, windows) and
report incorrect size of the table.
- Reuse the pack method for both initial and resizing listener to avoid
duplicate code and ensure it uses the same pack algorithm.
Due to NatTable bug, we have to configure the header font once the table
is created, otherwise we don't see any change in the font header.

Update:
- Remove ScopeMouseListener. Unused with nattable
This font is used in some parts of the GUI, not only for the tables.
When no item is checked we shouldn't enable the ok button or otherwise
it will confuse users. Instead, in this case, we should only enable
cancel button.
This feature was in the old hpcviewer (before nattable era) and should
be preserved.
For unknown reason, on Linux/GTK it triggers resize event even though
the window's size doesn't change.
This fix will check manually if there's any changes with table size or
not.

Other fix: Make sure the width of tree column is static as much as
possible unless its width is bigger than the table's width.
Otherwise it keeps intercepting the resizing event
It turns out the output of bodyDataLayer.getColumnWidthByPosition has to
be converted to pixels although the doc says the unit is pixels.
When users specify which columns to hide or shown, we should as much as
possible to display the columns although it means we need to adjust the
size of tree column
Since autofit action is global, we need to broadcast the event to other
opened databases as well to make sure they refresh the icon.

Plus, distinguish autofit into keeping the tree column (for window
resizing and font changes) and auto adjust tree column (default)
Remove unused AbstractItemViewWithTable class.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 1, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

2.6% 2.6% Coverage
0.0% 0.0% Duplication

@laksono laksono closed this Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant