diff --git a/src/prefs/MousePrefs.cpp b/src/prefs/MousePrefs.cpp index 41a490a43..aef6c7749 100644 --- a/src/prefs/MousePrefs.cpp +++ b/src/prefs/MousePrefs.cpp @@ -48,7 +48,6 @@ // The numbers of the columns of the mList. enum { - BlankColumn, ToolColumn, ActionColumn, ButtonsColumn, @@ -106,13 +105,14 @@ void MousePrefs::PopulateOrExchange(ShuttleGui & S) /// Creates the contents of mList void MousePrefs::CreateList() { - //An empty first column is a workaround - under Win98 the first column + //A dummy first column, which is then deleted, is a workaround - under Windows the first column //can't be right aligned. - mList->InsertColumn(BlankColumn, wxT(""), wxLIST_FORMAT_LEFT); - mList->InsertColumn(ToolColumn, _("Tool"), wxLIST_FORMAT_RIGHT); - mList->InsertColumn(ActionColumn, _("Command Action"), wxLIST_FORMAT_RIGHT); - mList->InsertColumn(ButtonsColumn, _("Buttons"), wxLIST_FORMAT_LEFT); - mList->InsertColumn(CommentColumn, _("Comments"), wxLIST_FORMAT_LEFT); + mList->InsertColumn(0, wxT(""), wxLIST_FORMAT_LEFT); + mList->InsertColumn(ToolColumn + 1, _("Tool"), wxLIST_FORMAT_RIGHT); + mList->InsertColumn(ActionColumn + 1, _("Command Action"), wxLIST_FORMAT_RIGHT); + mList->InsertColumn(ButtonsColumn + 1, _("Buttons"), wxLIST_FORMAT_LEFT); + mList->InsertColumn(CommentColumn + 1, _("Comments"), wxLIST_FORMAT_LEFT); + mList->DeleteColumn(0); AddItem(_("Left-Click"), _("Select"), _("Set Selection Point")); AddItem(_("Left-Drag"), _("Select"), _("Set Selection Range")); @@ -167,7 +167,6 @@ void MousePrefs::CreateList() AddItem(CTRL + _("-Wheel-Rotate"), _("Any"), _("Zoom waveform in or out")); AddItem(CTRL + _("-Shift-Wheel-Rotate"), _("Any"), _("Vertical Scale Waveform (dB) range")); - mList->SetColumnWidth(BlankColumn, 0); mList->SetColumnWidth(ToolColumn, wxLIST_AUTOSIZE); mList->SetColumnWidth(ActionColumn, wxLIST_AUTOSIZE); mList->SetColumnWidth(ButtonsColumn, wxLIST_AUTOSIZE); @@ -184,8 +183,7 @@ void MousePrefs::AddItem(wxString const & buttons, wxString const & tool, wxString const & action, wxString const & comment) { int i = mList->GetItemCount(); - mList->InsertItem(i, wxT("")); - mList->SetItem(i, ToolColumn, tool); + mList->InsertItem(i, tool); mList->SetItem(i, ActionColumn, action); mList->SetItem(i, ButtonsColumn, buttons);