Skip to content

Commit

Permalink
Fix: Treat mouse moving in selecting by mouse as one move
Browse files Browse the repository at this point in the history
Fix #284
  • Loading branch information
LiMinggang committed Apr 30, 2019
1 parent d472a45 commit 2359fed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ New: Improve MadPython API to support readable APIs
New: Japanese Translation(Thanks Tilt <tiltstr@gmail.com>)
New: Package for FreeBSD 12.0
Fix: wxWidgets 3.0.x backward compatibility
Fix: Treat mouse moving in selecting by mouse as one move #284
Change *nix build to use shared libs released by the OS. You have to install libwxgtk by yourself
Add wxWidgets version number in About dialog
Update boostpython to 1.70
Expand Down
9 changes: 4 additions & 5 deletions src/MadEdit/MadEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10237,6 +10237,10 @@ void MadEdit::OnMouseLeftUp( wxMouseEvent &evt )
if( !m_DragDrop )
{
EndUpdateSelection( true );
if( m_RecordCaretMovements && m_Selection )
{
m_CaretTracker->Add( m_SelectionPos1.pos, m_SelectionPos2.pos );
}
}
}

Expand Down Expand Up @@ -10479,11 +10483,6 @@ void MadEdit::OnMouseMotion( wxMouseEvent &evt )
}

DoSelectionChanged();

if( m_RecordCaretMovements && oldCaretPos != m_CaretPos.pos )
{
m_CaretTracker->Add( oldCaretPos, m_CaretPos.pos );
}
}

evt.Skip();
Expand Down

0 comments on commit 2359fed

Please sign in to comment.