replace 5 copies of size constraining code with one function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -237,15 +237,7 @@ void wxPopupWindow::DoSetSize( int x, int y, int width, int height, int sizeFlag
|
||||
}
|
||||
*/
|
||||
|
||||
int minWidth = GetMinWidth(),
|
||||
minHeight = GetMinHeight(),
|
||||
maxWidth = GetMaxWidth(),
|
||||
maxHeight = GetMaxHeight();
|
||||
|
||||
if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth;
|
||||
if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight;
|
||||
if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;
|
||||
if ((maxHeight != -1) && (m_height > maxHeight)) m_height = maxHeight;
|
||||
ConstrainSize();
|
||||
|
||||
if ((m_x != -1) || (m_y != -1))
|
||||
{
|
||||
|
Reference in New Issue
Block a user