void UnselectAllChildren( wxGenericTreeItem *item );
void ChildrenClosing(wxGenericTreeItem* item);
+ void DoDirtyProcessing();
+
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxGenericTreeCtrl)
#if defined( __WXMSW__ ) || defined(__WXMAC__)
Update();
#else
- wxYieldIfNeeded();
+ DoDirtyProcessing();
#endif
wxGenericTreeItem *gitem = (wxGenericTreeItem*) item.m_pItem;
#if defined( __WXMSW__ ) || defined(__WXMAC__)
Update();
#else
- wxYieldIfNeeded();
+ DoDirtyProcessing();
#endif
// TODO: use textCtrlClass here to create the control of correct class
SelectItem(GetRootItem());
}
- /* after all changes have been done to the tree control,
- * we actually redraw the tree when everything is over */
-
- if (!m_dirty) return;
- if (m_freezeCount) return;
-
- m_dirty = false;
-
- CalculatePositions();
- Refresh();
- AdjustMyScrollbars();
+ // after all changes have been done to the tree control,
+ // actually redraw the tree when everything is over
+ if (m_dirty)
+ DoDirtyProcessing();
}
void wxGenericTreeCtrl::CalculateSize( wxGenericTreeItem *item, wxDC &dc )
#endif // WXWIN_COMPATIBILITY_2_4
+void wxGenericTreeCtrl::DoDirtyProcessing()
+{
+ if (m_freezeCount)
+ return;
+
+ m_dirty = false;
+
+ CalculatePositions();
+ Refresh();
+ AdjustMyScrollbars();
+}
+
#endif // wxUSE_TREECTRL