From: Thomas Debesse Date: Mon, 25 May 2020 18:21:20 +0000 (+0200) Subject: Merge commit 'fab6205991b78b158852d0d5a86e4b73ae0c1d55' into garux-merge X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5e3961896b9e30ebbc736b542f177054188c05bf;p=xonotic%2Fnetradiant.git Merge commit 'fab6205991b78b158852d0d5a86e4b73ae0c1d55' into garux-merge --- 5e3961896b9e30ebbc736b542f177054188c05bf diff --cc radiant/selection.cpp index 9801d193,c7870d8b..1ecd3624 --- a/radiant/selection.cpp +++ b/radiant/selection.cpp @@@ -3599,12 -3648,31 +3652,31 @@@ void mouseDown( DeviceVector position ) void mouseMoved( DeviceVector position ){ m_current = device_constrained( position ); - draw_area(); + if( !m_mouse2 ){ + draw_area(); + } + else if( m_paintInitialized ){ + getSelectionSystem().SelectPoint( *m_view, &position[0], &m_epsilon[0], + m_paintSelect ? RadiantSelectionSystem::eSelect : RadiantSelectionSystem::eDeselect, + ( m_state & c_modifier_face ) != c_modifierNone ); + } + else{ + DeviceVector delta( position - m_start ); + if ( fabs( delta.x() ) > m_epsilon.x() || fabs( delta.y() ) > m_epsilon.y() ) { + m_paintSelect = getSelectionSystem().SelectPoint_InitPaint( *m_view, &position[0], &m_epsilon[0], ( m_state & c_modifier_face ) != c_modifierNone ); + m_paintInitialized = true; + } + } } -typedef MemberCaller1 MouseMovedCaller; +typedef MemberCaller MouseMovedCaller; void mouseUp( DeviceVector position ){ - testSelect( device_constrained( position ) ); + if( !m_paintInitialized ){ + testSelect( device_constrained( position ) ); + } + else{ + m_start = m_current = DeviceVector( 0.0f, 0.0f ); + } g_mouseMovedCallback.clear(); g_mouseUpCallback.clear();