Skip to content

Commit

Permalink
Merge pull request #5135 from whalley/master
Browse files Browse the repository at this point in the history
fix(#5122): secondary sort default is ID
  • Loading branch information
whalley committed Sep 27, 2022
2 parents 3bc3364 + e0f6ab8 commit 16e0a39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mmchecking_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ TransactionListCtrl::TransactionListCtrl(
m_attr17(new wxListItemAttr(*bestFontColour(mmColors::userDefColor7), mmColors::userDefColor7, wxNullFont)),
m_sortCol(COL_DEF_SORT),
g_sortcol(COL_DEF_SORT),
prev_g_sortcol(COL_DEF_SORT),
prev_g_sortcol(COL_DEF_SORT2),
g_asc(true),
prev_g_asc(true),
m_firstSort(true),
Expand Down
3 changes: 2 additions & 1 deletion src/mmchecking_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ class TransactionListCtrl : public mmListCtrl
COL_UDFC04,
COL_UDFC05,
COL_MAX, // number of columns
COL_DEF_SORT = COL_DATE // don't omit any columns before this
COL_DEF_SORT = COL_DATE, // don't omit any columns before this
COL_DEF_SORT2 = COL_ID
};
EColumn toEColumn(long col);
public:
Expand Down
2 changes: 1 addition & 1 deletion src/mmcheckingpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ void mmCheckingPanel::CreateControls()
long val = m_listCtrlAccount->COL_DEF_SORT;
wxString strVal = Model_Setting::instance().GetStringSetting(wxString::Format("%s_SORT_COL", m_sortSaveTitle), wxString() << val);
if (strVal.ToLong(&val)) m_listCtrlAccount->g_sortcol = m_listCtrlAccount->toEColumn(val);
val = m_listCtrlAccount->COL_DEF_SORT;
val = m_listCtrlAccount->COL_DEF_SORT2;
strVal = Model_Setting::instance().GetStringSetting(wxString::Format("%s_SORT_COL2", m_sortSaveTitle), wxString() << val);
if (strVal.ToLong(&val)) m_listCtrlAccount->prev_g_sortcol = m_listCtrlAccount->toEColumn(val);

Expand Down

0 comments on commit 16e0a39

Please sign in to comment.