[Digikam-devel] [Bug 116148] Auto-scrolling when selecting large area

Gilles Caulier caulier.gilles at gmail.com
Sun Apr 1 18:07:47 BST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=116148         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From caulier.gilles gmail com  2007-04-01 19:07 -------
SVN commit 648898 by cgilles:

digiKam from trunk : Image editor selection improvement : canvas is able to select a region largest than the current visible image.
BUG: 116148


 M  +18 -8     canvas.cpp  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/canvas.cpp #648897:648898
 @ -466,8 +466,8  @
                QMIN(er.height() + 2, contentsRect().height()));
     
     paintViewport(er, (d->zoom <= 1.0) ? true : false);
-    if (d->zoom > 1.0)
-        d->paintTimer->start(100, true);
+/*    if (d->zoom > 1.0)
+        d->paintTimer->start(100, true);*/
 }
 
 void Canvas::slotPaintSmooth()
 @ -537,7 +537,7  @
                     sw = (int)floor(d->tileSize / d->zoom);
                     sh = (int)floor(d->tileSize / d->zoom);
 
-                    if (d->rubber && d->pressedMoved)
+                    if (d->rubber && d->pressedMoved && !d->pressedMoving)
                     {
                         QRect rr(d->rubber->normalize());
                         rr = QRect(d->rubber->normalize());
 @ -655,8 +655,12  @
             }
         
             viewport()->setMouseTracking(false);
+            d->pressedMoved  = false;
+            d->pressedMoving = true;
 
-            d->pressedMoving = true;
+            d->tileCache.clear();
+            viewport()->repaint(false);
+
             return;
         }
     }
 @ -716,22 +720,28  @
               d->lbActive || d->rbActive))
             return;
 
-        drawRubber();
+        // Clear old rubber.
+        if (d->pressedMoved)
+            drawRubber();
 
+        // Move content if necessary.
+        blockSignals(true);
+        ensureVisible(e->x(), e->y(), 10, 10);
+        blockSignals(false);
+
+        // draw the new rubber position.
         int r, b;
         r = (e->x() > d->pixmapRect.left()) ? e->x() : d->pixmapRect.left();
         r = (r < d->pixmapRect.right())     ? r      : d->pixmapRect.right();
         b = (e->y() > d->pixmapRect.top())  ? e->y() : d->pixmapRect.top();
         b = (b < d->pixmapRect.bottom())    ? b      : d->pixmapRect.bottom();
-
         d->rubber->setRight(r);
         d->rubber->setBottom(b);
+        drawRubber();
 
         d->pressedMoved  = true;
         d->pressedMoving = true;
 
-        drawRubber();
-
         // To refresh editor status bar with current selection.
         emit signalSelectionChanged(calcSeletedArea());
     }



More information about the Digikam-devel mailing list