diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-03-31 20:39:33 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-03-31 20:39:44 +0200 |
| commit | 8640da877450479a85c73b2a921897d83b478c84 (patch) | |
| tree | 8a99e8b9a98d3768d80427a67184f23848b7f073 /src | |
| parent | f1d8d450e31a72dea58a21df8da533456f18911b (diff) | |
Fix floating line at the top of the groups column.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/audio_mapping_view.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/wx/audio_mapping_view.cc b/src/wx/audio_mapping_view.cc index 2413502b8..67ece1f7b 100644 --- a/src/wx/audio_mapping_view.cc +++ b/src/wx/audio_mapping_view.cc @@ -261,10 +261,18 @@ AudioMappingView::paint_row_labels (wxDC& dc) ); } - /* Group labels and lines */ - int y = TOP_HEIGHT; - for (auto i: _input_groups) { + for (auto const& i: _input_groups) { + dc.DrawLine (wxPoint(MINIMUM_COLUMN_WIDTH, y), wxPoint(MINIMUM_COLUMN_WIDTH * 2, y)); + y += (i.to - i.from + 1) * ROW_HEIGHT; + } + dc.DrawLine (wxPoint(MINIMUM_COLUMN_WIDTH, y), wxPoint(MINIMUM_COLUMN_WIDTH * 2, y)); + + /* Group labels and lines; be careful here as wxDCClipper does not restore the old + * clipping rectangle after it is destroyed + */ + y = TOP_HEIGHT; + for (auto const& i: _input_groups) { int const height = (i.to - i.from + 1) * ROW_HEIGHT; dc.GetTextExtent (std_to_wx(i.name), &label_width, &label_height); if (label_width > height) { @@ -286,11 +294,8 @@ AudioMappingView::paint_row_labels (wxDC& dc) ); } - dc.DrawLine (wxPoint(MINIMUM_COLUMN_WIDTH, y), wxPoint(MINIMUM_COLUMN_WIDTH * 2, y)); y += height; } - - dc.DrawLine (wxPoint(MINIMUM_COLUMN_WIDTH, y), wxPoint(MINIMUM_COLUMN_WIDTH * 2, y)); } void |
