From 541c319a2da985c30c72ed9d452f3182dbf01be2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 8 Oct 2005 16:58:25 +0000 Subject: [PATCH] fixed logic bug in DoSetSize() (disabling a warning is good, fixing it is even better...) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/spinbutt.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/motif/spinbutt.cpp b/src/motif/spinbutt.cpp index e742ea7be4..5276663d1e 100644 --- a/src/motif/spinbutt.cpp +++ b/src/motif/spinbutt.cpp @@ -238,8 +238,8 @@ bool wxArrowButton::Create( wxSpinButton* parent, // wxSpinButton // ---------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl); -IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent); +IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent) static void CalcSizes( const wxPoint& pt, const wxSize& sz, wxPoint& pt1, wxSize& sz1, @@ -310,19 +310,12 @@ void wxSpinButton::DoMoveWindow(int x, int y, int width, int height) m_down->SetSize( pt2.x, pt2.y, sz2.x, sz2.y ); } -void wxSpinButton::DoSetSize(int x, int y, int width, int height, - int sizeFlags) +void wxSpinButton::DoSetSize(int x, int y, int width, int height, int sizeFlags) { -#ifdef __VMS__ -#pragma message disable codcauunr -#endif - if( sizeFlags & wxSIZE_USE_EXISTING && width == -1 ) + if ( (sizeFlags & wxSIZE_ALLOW_MINUS_ONE) && width == -1 ) width = GetSize().x; - if( sizeFlags & wxSIZE_USE_EXISTING && height == -1 ) + if ( (sizeFlags & wxSIZE_ALLOW_MINUS_ONE) && height == -1 ) height = GetSize().y; -#ifdef __VMS__ -#pragma message enable codcauunr -#endif wxControl::DoSetSize(x, y, width, height, 0); } -- 2.45.2