From 5c686fff42823311383b00c437110d71929e6f26 Mon Sep 17 00:00:00 2001 From: dbv Date: Wed, 20 Mar 2013 13:28:53 +0400 Subject: [PATCH] 0023841: Redundant assignment to itself. Removed redundant assignment to itself in ViewerTest_ViewerCommands --- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 498421d629..07c7b85e9a 100755 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -1160,8 +1160,6 @@ switch ( report.type ) { else { IsDragged = Standard_True; - X_ButtonPress = X_ButtonPress; - Y_ButtonPress = Y_ButtonPress; DragFirst = Standard_True; } } @@ -1234,11 +1232,6 @@ switch ( report.type ) { break; case MotionNotify: { - // XEvent dummy; - - X_Motion = report.xmotion.x; - Y_Motion = report.xmotion.y; - if( IsDragged ) { Aspect_Handle aWindow = VT_GetWindow()->XWindow(); @@ -1248,17 +1241,16 @@ switch ( report.type ) { if( !DragFirst ) XDrawRectangle( display, aWindow, gc, min( X_ButtonPress, X_Motion ), min( Y_ButtonPress, Y_Motion ), abs( X_Motion-X_ButtonPress ), abs( Y_Motion-Y_ButtonPress ) ); - X_Motion = X_Motion; - Y_Motion = Y_Motion; + X_Motion = report.xmotion.x; + Y_Motion = report.xmotion.y; DragFirst = Standard_False; - //cout << "draw rect : " << X_Motion << ", " << Y_Motion << endl; XDrawRectangle( display, aWindow, gc, min( X_ButtonPress, X_Motion ), min( Y_ButtonPress, Y_Motion ), abs( X_Motion-X_ButtonPress ), abs( Y_Motion-Y_ButtonPress ) ); } else { - - //cout << "MotionNotify " << X_Motion << "," << Y_Motion << endl; + X_Motion = report.xmotion.x; + Y_Motion = report.xmotion.y; // remove all the ButtonMotionMask while( XCheckMaskEvent( display, ButtonMotionMask, &report) ) ; -- 2.39.5