// We must finish regardless of success, otherwise we'll get
// focus problems:
Finish();
-
+
if ( !AcceptChanges() )
m_owner->OnRenameCancelled( m_itemEdited );
}
{
if ( select )
{
- DoSelectItem(itemId);
+ DoSelectItem(itemId, !HasFlag(wxTR_MULTIPLE));
}
else // deselect
{
{
wxColour colBg;
if ( attr && attr->HasBackgroundColour() )
- {
- drawItemBackground = true;
+ {
+ drawItemBackground = true;
colBg = attr->GetBackgroundColour();
- }
+ }
else
+ {
colBg = m_backgroundColour;
+ }
dc.SetBrush(wxBrush(colBg, wxSOLID));
}
{
// this facilitates multiple-item drag-and-drop
- if (item && HasFlag(wxTR_MULTIPLE))
+ if ( /* item && */ HasFlag(wxTR_MULTIPLE))
{
wxArrayTreeItemIds selections;
size_t count = GetSelections(selections);