argh! patch misapplied the patch in another place as well, fixing this
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2282,34 +2282,26 @@ void wxGenericTreeCtrl::Edit( const wxTreeItemId& item )
|
|||||||
m_imageListNormal->GetSize( image, image_w, image_h );
|
m_imageListNormal->GetSize( image, image_w, image_h );
|
||||||
image_w += 4;
|
image_w += 4;
|
||||||
}
|
}
|
||||||
else // !RightDown() && !LeftUp() ==> LeftDown() || LeftDClick()
|
else
|
||||||
{
|
{
|
||||||
wxFAIL_MSG(_T("you must create an image list to use images!"));
|
wxFAIL_MSG(_T("you must create an image list to use images!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x += image_w;
|
x += image_w;
|
||||||
w -= image_w + 4; // I don't know why +4 is needed
|
w -= image_w + 4; // I don't know why +4 is needed
|
||||||
if ( flags & wxTREE_HITTEST_ONITEMBUTTON )
|
|
||||||
{
|
|
||||||
// only toggle the item for a single click, double click on
|
|
||||||
// the button doesn't do anything (it toggles the item twice)
|
|
||||||
if ( event.LeftDown() )
|
|
||||||
{
|
|
||||||
Toggle( item );
|
|
||||||
}
|
|
||||||
|
|
||||||
// don't select the item if the button was clicked
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
wxClientDC dc(this);
|
wxClientDC dc(this);
|
||||||
PrepareDC( dc );
|
PrepareDC( dc );
|
||||||
x = dc.LogicalToDeviceX( x );
|
x = dc.LogicalToDeviceX( x );
|
||||||
y = dc.LogicalToDeviceY( y );
|
y = dc.LogicalToDeviceY( y );
|
||||||
|
|
||||||
wxTreeTextCtrl *text = new wxTreeTextCtrl(
|
wxTreeTextCtrl *text = new wxTreeTextCtrl(this, -1,
|
||||||
this, -1, &m_renameAccept, &m_renameRes, this, s, wxPoint(x-4,y-4), wxSize(w+11,h+8) );
|
&m_renameAccept,
|
||||||
|
&m_renameRes,
|
||||||
|
this,
|
||||||
|
s,
|
||||||
|
wxPoint(x-4,y-4),
|
||||||
|
wxSize(w+11,h+8));
|
||||||
text->SetFocus();
|
text->SetFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user