Restore scrollbars on large audio mapping views on Linux (#970).
authorCarl Hetherington <cth@carlh.net>
Sat, 13 May 2017 19:40:31 +0000 (20:40 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 13 May 2017 19:40:31 +0000 (20:40 +0100)
src/wx/audio_mapping_view.cc

index af892bb1178a2a54de9e47364fc7d6710424bb9f..a9cdb66999e46ea7d046f85ca07f7948c5c4be32 100644 (file)
@@ -138,6 +138,7 @@ AudioMappingView::AudioMappingView (wxWindow* parent)
        _grid->EnableEditing (false);
        _grid->SetCellHighlightPenWidth (0);
        _grid->SetDefaultRenderer (new NoSelectionStringRenderer);
+       _grid->EnableScrolling (true, true);
        _grid->AutoSize ();
 
        wxSizer* vertical_sizer = new wxBoxSizer (wxVERTICAL);
@@ -271,7 +272,7 @@ AudioMappingView::set_output_channels (vector<string> const & names)
        if (o < _grid->GetNumberCols ()) {
                _grid->DeleteCols (o, _grid->GetNumberCols() - o);
        } else if (o > _grid->GetNumberCols ()) {
-               _grid->InsertCols (_grid->GetNumberCols(), o - _grid->GetNumberCols());
+               _grid->AppendCols (o - _grid->GetNumberCols());
        }
 
        _grid->SetColLabelValue (0, wxT (""));
@@ -282,6 +283,8 @@ AudioMappingView::set_output_channels (vector<string> const & names)
 
        update_cells ();
        setup_sizes ();
+
+       Layout ();
 }
 
 void