From d44c23ceb6f816dedd0162f0ca9269ef5f97d0f5 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 23 Jul 2002 20:51:42 +0000 Subject: [PATCH] Changed wxGTK's notion of SetSize() to never allow setting the width and height to -1 even if the wxALLOW_MINUS_ONE flag is set. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/toplevel.cpp | 6 ++---- src/gtk/window.cpp | 6 ++---- src/gtk1/toplevel.cpp | 6 ++---- src/gtk1/window.cpp | 6 ++---- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index eb820f7f15..f8e5019b0d 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -593,16 +593,14 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si { if (x != -1) m_x = x; if (y != -1) m_y = y; - if (width != -1) m_width = width; - if (height != -1) m_height = height; } else { m_x = x; m_y = y; - m_width = width; - m_height = height; } + if (width != -1) m_width = width; + if (height != -1) m_height = height; /* if ((sizeFlags & wxSIZE_AUTO_WIDTH) == wxSIZE_AUTO_WIDTH) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index d3dac9b822..2786d91934 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2691,16 +2691,14 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags { if (x != -1) m_x = x + pizza->xoffset; if (y != -1) m_y = y + pizza->yoffset; - if (width != -1) m_width = width; - if (height != -1) m_height = height; } else { m_x = x + pizza->xoffset; m_y = y + pizza->yoffset; - m_width = width; - m_height = height; } + if (width != -1) m_width = width; + if (height != -1) m_height = height; if ((sizeFlags & wxSIZE_AUTO_WIDTH) == wxSIZE_AUTO_WIDTH) { diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index eb820f7f15..f8e5019b0d 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -593,16 +593,14 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si { if (x != -1) m_x = x; if (y != -1) m_y = y; - if (width != -1) m_width = width; - if (height != -1) m_height = height; } else { m_x = x; m_y = y; - m_width = width; - m_height = height; } + if (width != -1) m_width = width; + if (height != -1) m_height = height; /* if ((sizeFlags & wxSIZE_AUTO_WIDTH) == wxSIZE_AUTO_WIDTH) diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index d3dac9b822..2786d91934 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2691,16 +2691,14 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags { if (x != -1) m_x = x + pizza->xoffset; if (y != -1) m_y = y + pizza->yoffset; - if (width != -1) m_width = width; - if (height != -1) m_height = height; } else { m_x = x + pizza->xoffset; m_y = y + pizza->yoffset; - m_width = width; - m_height = height; } + if (width != -1) m_width = width; + if (height != -1) m_height = height; if ((sizeFlags & wxSIZE_AUTO_WIDTH) == wxSIZE_AUTO_WIDTH) { -- 2.45.2