1. 16 Jun, 2017 1 commit
    • Dmitry Kazakov's avatar
      Implement KoShape::updateAbsolute() for complex transformation updates · 6f51599f
      Dmitry Kazakov authored
      Historically, transformation code uses extremely weird method of shape
      updates that rely on the event loop. This patch implements a framework
      for moving away from this strategy.
      
      The problem:
      
      When one transforms a shape he needs to update both areas: bounding
      rect of the shape *before* the transform and a bounding rect of the shape
      *after* the transform. Before the patch, the transformation code used the
      system like that:
      
      shape->update();
      shape->setTransformation(newTransform);
      shape->update();
      
      That works only with assumption that the first update() call will *not*
      be executed before setTransform() call. That should be true atm, but it
      is not guaranteed to be so in the future. Therefore, now the update happens
      like that:
      
      const QRectF oldDirtyRect = shape->boundingRect();
      shape->setTransformation(newTransform);
      shape->updateAbsolute(oldDirtyRect | shape->boundingRect());
      6f51599f
  2. 18 May, 2017 2 commits
  3. 10 May, 2017 2 commits
  4. 08 May, 2017 1 commit
  5. 06 Apr, 2017 1 commit
  6. 24 Mar, 2017 1 commit
  7. 17 Mar, 2017 3 commits
  8. 15 Mar, 2017 2 commits
  9. 14 Mar, 2017 5 commits
  10. 09 Mar, 2017 1 commit
  11. 07 Mar, 2017 1 commit
  12. 06 Mar, 2017 2 commits
    • Dmitry Kazakov's avatar
    • Dmitry Kazakov's avatar
      Fix dangling connections to the shape selection · 5a23ec0d
      Dmitry Kazakov authored
      1) In Krita we have a "weird" system, where KisCanvas2 switches shape
         managers depending the currently activated shape layer/selection.
         I call it "weird" not because it is bad, but because Flake system
         was not designed for that. Quite a lot of dockers and objects
         make connections to a KoSelection, and keep these connections
         throughout the entire run of Krita. That is wrong behavior in Krita.
      
      2) To solve the issue I created a special proxy object:
      
         KoCanvasBase::selectedShapesProxy()
      
         which has the same selection signals provided by KoSelection and
         KoShapeManager, but that is guaranteed to be persistent throughout
         the entire life of KoCanvasBase.
      5a23ec0d
  13. 27 Feb, 2017 1 commit
    • Boudewijn Rempt's avatar
      Delete KisView on closing a view. · 6f614b5f
      Boudewijn Rempt authored
      This first makes KoCanvasBase a QObject; that used to be impossible
      because other calligra applications canvas classes multiply inherited
      QWidget and KoCanvasBase. That is no longer a consideration.
      
      Then every local use of a pointer to KoCanvasBase or KisCanvas2 is
      protected by QPointer. Now every canvas observer knows when a canvas
      has disappeared.
      
      But the canvas is deleted before the canvascontroller widget; that means
      that when deleting the canvas, the canvas controller widget would get
      confused because the canvas observers' canvas has already been deleted:
      unsetCanvas wouldn't be called on the canvas observers, so the logic here
      is now that if unsetCanvas is called when deleting the canvas controller
      widget, unsetCanvas is always called on all observers.
      
      Note: no dockers crash even if unsetCanvas isn't called at the right time,
      but it's still proper to call unsetCanvas to allow dockers to clean up
      things like local models linked to the layer model.
      6f614b5f
  14. 23 Feb, 2017 2 commits
  15. 22 Feb, 2017 2 commits
  16. 20 Feb, 2017 1 commit
  17. 18 Feb, 2017 1 commit
  18. 17 Feb, 2017 3 commits
  19. 14 Feb, 2017 1 commit
  20. 08 Feb, 2017 2 commits
  21. 07 Feb, 2017 1 commit
  22. 06 Feb, 2017 4 commits