Remove public wxFileHistory::RefreshLabels()
Replace it with a private DoRefreshLabels() and call it ourselves from SetMenuPathStyle() to make the class simpler (and less error-prone, as it's now impossible to forget to call RefreshLabels() any more) to use.
This commit is contained in:
@@ -67,11 +67,9 @@ public:
|
||||
void SetBaseId(wxWindowID baseId) { m_idBase = baseId; }
|
||||
wxWindowID GetBaseId() const { return m_idBase; }
|
||||
|
||||
void SetMenuPathStyle(wxFileHistoryMenuPathStyle style) { m_menuPathStyle = style; }
|
||||
void SetMenuPathStyle(wxFileHistoryMenuPathStyle style);
|
||||
wxFileHistoryMenuPathStyle GetMenuPathStyle() const { return m_menuPathStyle; }
|
||||
|
||||
void RefreshLabels();
|
||||
|
||||
protected:
|
||||
// Last n files
|
||||
wxArrayString m_fileHistory;
|
||||
@@ -86,6 +84,9 @@ protected:
|
||||
wxFileHistoryMenuPathStyle m_menuPathStyle;
|
||||
|
||||
private:
|
||||
void DoRefreshLabels();
|
||||
|
||||
|
||||
// The ID of the first history menu item (Doesn't have to be wxID_FILE1)
|
||||
wxWindowID m_idBase;
|
||||
|
||||
|
Reference in New Issue
Block a user