From 0aa711ef74d99e0554f448e5fbca17716a9bd41a Mon Sep 17 00:00:00 2001 From: Garux Date: Thu, 14 Mar 2019 21:19:15 +0300 Subject: [PATCH] better move amount measurement logic for m2 = texbro scroll or tags condition --- radiant/texwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radiant/texwindow.cpp b/radiant/texwindow.cpp index 50c27b81..24144a53 100644 --- a/radiant/texwindow.cpp +++ b/radiant/texwindow.cpp @@ -1020,7 +1020,7 @@ void TextureBrowser_trackingDelta( int x, int y, unsigned int state, void* data const int scale = ( state & GDK_SHIFT_MASK )? 4 : 1; const int originy = TextureBrowser_getOriginY( textureBrowser ) + y * scale; TextureBrowser_setOriginY( textureBrowser, originy ); - textureBrowser.m_move_amount += y; + textureBrowser.m_move_amount += std::abs( y ); } } @@ -1433,7 +1433,7 @@ gboolean TextureBrowser_button_release( GtkWidget* widget, GdkEventButton* event if ( event->type == GDK_BUTTON_RELEASE ) { if ( event->button == 3 ) { TextureBrowser_Tracking_MouseUp( *textureBrowser ); - if ( GlobalTextureBrowser().m_tags && std::abs( textureBrowser->m_move_amount ) < 16 ) { + if ( GlobalTextureBrowser().m_tags && textureBrowser->m_move_amount < 16 ) { textureBrowser->m_rmbSelected = true; TextureBrowser_Selection_MouseDown( *textureBrowser, event->state, textureBrowser->m_move_start.x(), textureBrowser->m_move_start.y(), false );