[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Mon Aug 8 05:09:16 CEST 2005


SVN commit 443957 by staikos:

- (foo & x) == x  is the same as foo & x
- add a missing default:


 M  +8 -6      ksttoplevelview.cpp  


--- trunk/extragear/graphics/kst/kst/ksttoplevelview.cpp #443956:443957
@@ -556,10 +556,10 @@
     if (_pressDirection == 0) {
       // moving an object
       pressMoveLayoutModeMove(pos, shift);
-    } else if ((_pressDirection & ENDPOINT) == ENDPOINT) {
+    } else if (_pressDirection & ENDPOINT) {
       // moving an endpoint of an object
       pressMoveLayoutModeEndPoint(pos, shift);
-    } else if ((_pressDirection & CENTREDRESIZE) == CENTREDRESIZE) {
+    } else if (_pressDirection & CENTREDRESIZE) {
       // resizing an object with fixed centre
       pressMoveLayoutModeCentredResize(pos, shift);
     } else {
@@ -705,11 +705,11 @@
       _prevBand.setTopLeft(line->from());
       _prevBand.setBottomRight(line->to()); 
     }
-    if ((_pressDirection & UP) == UP) {
+    if (_pressDirection & UP) {
       // UP means we are on the start endpoint
       toPoint = _prevBand.bottomRight();
       fromPoint = pos;
-    } else if ((_pressDirection & DOWN) == DOWN) {
+    } else if (_pressDirection & DOWN) {
       // DOWN means we are on the end endpoint
       fromPoint = _prevBand.topLeft();
       toPoint = pos;
@@ -774,6 +774,8 @@
             care = true;  
           }
           break;
+        default:
+          break;
       }
       if (care) {
         if ((*i)->maximized()) {
@@ -813,10 +815,10 @@
     if (_pressDirection == 0) {
       // we are moving object(s)
       releasePressLayoutModeMove(pos, shift);
-    } else if ((_pressDirection & ENDPOINT) == ENDPOINT) {
+    } else if (_pressDirection & ENDPOINT) {
       // moving an endpoint of an object
       releasePressLayoutModeEndPoint(pos, shift);
-    } else if ((_pressDirection & CENTREDRESIZE) == CENTREDRESIZE) {
+    } else if (_pressDirection & CENTREDRESIZE) {
       // resizing an object whose centre is fixed
       releasePressLayoutModeCentredResize(pos, shift);
     } else {


More information about the Kst mailing list