fix a couple GTK assertions about setting negative sizes, closes #15891

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2014-01-23 05:47:43 +00:00
parent 6286f9b1ef
commit eb1f6dd806
2 changed files with 6 additions and 2 deletions

View File

@@ -1354,9 +1354,11 @@ void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust
else
{
// If it has border, have textctrl fill the entire text field.
int w = m_tcArea.width - m_widthCustomPaint;
if (w < 0) w = 0;
m_text->SetSize( m_tcArea.x + m_widthCustomPaint,
m_tcArea.y,
m_tcArea.width - m_widthCustomPaint,
w,
m_tcArea.height );
}
}