diff --git a/docs/changes.txt b/docs/changes.txt index 17f4575489..94b701ca75 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -6,6 +6,15 @@ Note: This file contains the list of changes since wxWidgets 3.x, please see docs/changes_30.txt for the changes in the previous versions. +INCOMPATIBLE CHANGES SINCE 3.0.x: +================================= + +Changes in behaviour not resulting in compilation errors +-------------------------------------------------------- + +- wxRibbonButtonBar::DeleteButton() now deletes and not just removes the button. + + 3.1.0: (released 2014-xx-xx) ---------------------------- diff --git a/interface/wx/ribbon/buttonbar.h b/interface/wx/ribbon/buttonbar.h index 27c396d7ac..6eebd7ca91 100644 --- a/interface/wx/ribbon/buttonbar.h +++ b/interface/wx/ribbon/buttonbar.h @@ -442,7 +442,10 @@ public: /** Delete a single button from the button bar. - + + The corresponding button is deleted by this function, so any pointers to + it previously obtained by GetItem() or GetItemById() become invalid. + @see ClearButtons() */ virtual bool DeleteButton(int button_id); diff --git a/src/ribbon/buttonbar.cpp b/src/ribbon/buttonbar.cpp index 39e4c4f247..0dca48d9ee 100644 --- a/src/ribbon/buttonbar.cpp +++ b/src/ribbon/buttonbar.cpp @@ -515,6 +515,7 @@ bool wxRibbonButtonBar::DeleteButton(int button_id) { m_layouts_valid = false; m_buttons.RemoveAt(i); + delete button; Realize(); Refresh(); return true;