stop the rename timer when the current item changes (Tim Kosse)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2876,6 +2876,11 @@ void wxListMainWindow::ChangeCurrent(size_t current)
|
|||||||
{
|
{
|
||||||
m_current = current;
|
m_current = current;
|
||||||
|
|
||||||
|
// as the current item changed, we shouldn't start editing it when the
|
||||||
|
// "slow click" timer expires as the click happened on another item
|
||||||
|
if ( m_renameTimer->IsRunning() )
|
||||||
|
m_renameTimer->Stop();
|
||||||
|
|
||||||
SendNotify(current, wxEVT_COMMAND_LIST_ITEM_FOCUSED);
|
SendNotify(current, wxEVT_COMMAND_LIST_ITEM_FOCUSED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3076,7 +3081,9 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
|||||||
bool forceClick = false;
|
bool forceClick = false;
|
||||||
if (event.ButtonDClick())
|
if (event.ButtonDClick())
|
||||||
{
|
{
|
||||||
|
if ( m_renameTimer->IsRunning() )
|
||||||
m_renameTimer->Stop();
|
m_renameTimer->Stop();
|
||||||
|
|
||||||
m_lastOnSame = false;
|
m_lastOnSame = false;
|
||||||
|
|
||||||
if ( current == m_lineLastClicked )
|
if ( current == m_lineLastClicked )
|
||||||
|
Reference in New Issue
Block a user