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<Selector_, DeviceVector, &Selector_::mouseMoved> MouseMovedCaller;
+typedef MemberCaller<Selector_, void(DeviceVector), &Selector_::mouseMoved> 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();