X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f2593d0ddae43a3e9054d2e9bb59646e19dffe73..9bc8fded1b3e6e20da20c2471aead3d5761a6bcd:/src/generic/treectrl.cpp diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index dfe2222291..af2d4cf2e3 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -167,8 +167,8 @@ private: // children but has a [+] button int m_isBold :1; // render the label in bold font - int m_x, m_y; - long m_height, m_width; + wxCoord m_x, m_y; + wxCoord m_height, m_width; int m_xCross, m_yCross; int m_level; @@ -208,13 +208,18 @@ BEGIN_EVENT_TABLE(wxTreeTextCtrl,wxTextCtrl) EVT_KILL_FOCUS (wxTreeTextCtrl::OnKillFocus) END_EVENT_TABLE() -wxTreeTextCtrl::wxTreeTextCtrl( wxWindow *parent, const wxWindowID id, - bool *accept, wxString *res, wxTreeCtrl *owner, - const wxString &value, const wxPoint &pos, const wxSize &size, -#if wxUSE_VALIDATORS - int style, const wxValidator& validator, const wxString &name ) : -#endif - wxTextCtrl( parent, id, value, pos, size, style, validator, name ) +wxTreeTextCtrl::wxTreeTextCtrl( wxWindow *parent, + const wxWindowID id, + bool *accept, + wxString *res, + wxTreeCtrl *owner, + const wxString &value, + const wxPoint &pos, + const wxSize &size, + int style, + const wxValidator& validator, + const wxString &name ) + : wxTextCtrl( parent, id, value, pos, size, style, validator, name ) { m_res = res; m_accept = accept; @@ -547,10 +552,8 @@ void wxTreeCtrl::Init() bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, -#if wxUSE_VALIDATORS - const wxValidator &validator, -#endif - const wxString& name ) + const wxValidator &validator, + const wxString& name ) { Init(); @@ -589,14 +592,12 @@ void wxTreeCtrl::SetIndent(unsigned int indent) { m_indent = indent; m_dirty = TRUE; - Refresh(); } void wxTreeCtrl::SetSpacing(unsigned int spacing) { m_spacing = spacing; m_dirty = TRUE; - Refresh(); } size_t wxTreeCtrl::GetChildrenCount(const wxTreeItemId& item, bool recursively) @@ -2160,6 +2161,8 @@ void wxTreeCtrl::CalculatePositions() void wxTreeCtrl::RefreshSubtree(wxGenericTreeItem *item) { + if (m_dirty) return; + wxClientDC dc(this); PrepareDC(dc); @@ -2180,6 +2183,8 @@ void wxTreeCtrl::RefreshSubtree(wxGenericTreeItem *item) void wxTreeCtrl::RefreshLine( wxGenericTreeItem *item ) { + if (m_dirty) return; + wxClientDC dc(this); PrepareDC( dc );