1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-26 10:19:45 +03:00

0023841: Redundant assignment to itself.

Removed redundant assignment to itself in ViewerTest_ViewerCommands
This commit is contained in:
dbv 2013-03-20 13:28:53 +04:00
parent e2f0aca019
commit 5c686fff42

View File

@ -1160,8 +1160,6 @@ switch ( report.type ) {
else else
{ {
IsDragged = Standard_True; IsDragged = Standard_True;
X_ButtonPress = X_ButtonPress;
Y_ButtonPress = Y_ButtonPress;
DragFirst = Standard_True; DragFirst = Standard_True;
} }
} }
@ -1234,11 +1232,6 @@ switch ( report.type ) {
break; break;
case MotionNotify: case MotionNotify:
{ {
// XEvent dummy;
X_Motion = report.xmotion.x;
Y_Motion = report.xmotion.y;
if( IsDragged ) if( IsDragged )
{ {
Aspect_Handle aWindow = VT_GetWindow()->XWindow(); Aspect_Handle aWindow = VT_GetWindow()->XWindow();
@ -1248,17 +1241,16 @@ switch ( report.type ) {
if( !DragFirst ) 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 ) ); 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; X_Motion = report.xmotion.x;
Y_Motion = Y_Motion; Y_Motion = report.xmotion.y;
DragFirst = Standard_False; 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 ) ); 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 else
{ {
X_Motion = report.xmotion.x;
//cout << "MotionNotify " << X_Motion << "," << Y_Motion << endl; Y_Motion = report.xmotion.y;
// remove all the ButtonMotionMask // remove all the ButtonMotionMask
while( XCheckMaskEvent( display, ButtonMotionMask, &report) ) ; while( XCheckMaskEvent( display, ButtonMotionMask, &report) ) ;