projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Applied patch [ 583922 ] Make generic/wxListCtrl avail. in WIN32
[wxWidgets.git]
/
src
/
gtk
/
region.cpp
diff --git
a/src/gtk/region.cpp
b/src/gtk/region.cpp
index f184e4d7955844f4793692316588e021b00153b1..11ca072cd31d321376918745024b83fb78ac067d 100644
(file)
--- a/
src/gtk/region.cpp
+++ b/
src/gtk/region.cpp
@@
-39,6
+39,7
@@
public:
}
wxRegionRefData(const wxRegionRefData& refData)
}
wxRegionRefData(const wxRegionRefData& refData)
+ : wxObjectRefData()
{
#ifdef __WXGTK20__
m_region = gdk_region_copy(refData.m_region);
{
#ifdef __WXGTK20__
m_region = gdk_region_copy(refData.m_region);
@@
-66,8
+67,8
@@
public:
#define M_REGIONDATA ((wxRegionRefData *)m_refData)
#define M_REGIONDATA_OF(rgn) ((wxRegionRefData *)(rgn.m_refData))
#define M_REGIONDATA ((wxRegionRefData *)m_refData)
#define M_REGIONDATA_OF(rgn) ((wxRegionRefData *)(rgn.m_refData))
-IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
;
-IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject)
;
+IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
+IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject)
// ----------------------------------------------------------------------------
// wxRegion construction
// ----------------------------------------------------------------------------
// wxRegion construction
@@
-470,31
+471,31
@@
struct _XRegion {
class wxRIRefData: public wxObjectRefData
{
public:
class wxRIRefData: public wxObjectRefData
{
public:
+ wxRIRefData() { Init(); }
+ virtual ~wxRIRefData();
- wxRIRefData() : m_rects(0), m_numRects(0){}
- ~wxRIRefData();
+ void CreateRects( const wxRegion& r );
+
+ void Init() { m_rects = NULL; m_numRects = 0; }
wxRect *m_rects;
size_t m_numRects;
wxRect *m_rects;
size_t m_numRects;
-
- void CreateRects( const wxRegion& r );
};
wxRIRefData::~wxRIRefData()
{
};
wxRIRefData::~wxRIRefData()
{
- delete m_rects;
+ delete
[]
m_rects;
}
void wxRIRefData::CreateRects( const wxRegion& region )
{
}
void wxRIRefData::CreateRects( const wxRegion& region )
{
- if (m_rects)
- delete m_rects;
+ delete [] m_rects;
- m_rects = 0;
- m_numRects = 0;
+ Init();
GdkRegion *gdkregion = region.GetRegion();
GdkRegion *gdkregion = region.GetRegion();
- if (!gdkregion) return;
+ if (!gdkregion)
+ return;
#ifdef __WXGTK20__
GdkRectangle *gdkrects = NULL;
#ifdef __WXGTK20__
GdkRectangle *gdkrects = NULL;