Make wxSizerItem::GetRect() const

There is really no reason for it not to be.

There also doesn't seem to be any reason for it to be virtual, but keep
this just to warn any people who override it in their code so that they
could add "const".
This commit is contained in:
Vadim Zeitlin
2026-02-23 20:25:26 +01:00
parent 5a79c2599a
commit 0aaf8a964e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -374,7 +374,7 @@ public:
float GetRatio() const
{ return m_ratio; }
virtual wxRect GetRect() { return m_rect; }
virtual wxRect GetRect() const { return m_rect; }
// set a sizer item id (different from a window id, all sizer items,
// including spacers, can have an associated id)
+1 -1
View File
@@ -1306,7 +1306,7 @@ public:
/**
Get the rectangle of the item on the parent window, excluding borders.
*/
virtual wxRect GetRect();
virtual wxRect GetRect() const;
/**
Get the current size of the item, as set in the last Layout.