1. 14 Jan, 2021 1 commit
  2. 15 Dec, 2020 1 commit
  3. 27 Nov, 2020 1 commit
  4. 14 Sep, 2020 2 commits
    • Dmitry Kazakov's avatar
      Make `repaintDecorations()` a slot · 4fd02482
      Dmitry Kazakov authored
      This way we can connect signals directly to it
      4fd02482
    • Dmitry Kazakov's avatar
      Fix partial updates of vector tools · b2521b98
      Dmitry Kazakov authored
      The patch removes all the custom code for decorations updates inside
      vector tools. Everything is done via KoToolBase::decorationsRect().
      
      One should take it into account that there are two separate update
      streams, when editing vector shapes:
      
      1) Updating the canvas inside KisShapeLayer. These updates land on the
         pixel data of the layer and saved into .kra file. They are issued
         by calling `shape->update()` or `shape->updateAbsolute()`.
      
      2) Updating the global KisCanvas2 canvas, which is basically an openGL
         representation painted on the screen. This representation also has
         handles and other decorations painted, it is not saved into .kra
         file.
      
      The patch resolves the problem of the second type of updates. Now the
      tool's code shouldn't care about the updates for decorations (save the
      previous bounding rect, update and issue update for the united rect).
      Instead, `KoToolBase::repaintDecorations()` handles the changes like it
      it doen for brush outline code in Krita. Each tool with decorations
      declares an implementation for `decorationsRect()` and
      `repaintDecorations()` saved the previously painted rect internally.
      Therefore, after any change in decorations the tool may just call
      `repaintDecorations()` and it will handle updates correctly.
      
      # Conflicts:
      #	libs/flake/tools/KoPathTool.cpp
      b2521b98
  5. 29 Nov, 2018 1 commit
    • Halla Rempt's avatar
      add a createActions method to KoToolFactoryBase · 5f91230f
      Halla Rempt authored
      Actions created by a tool instance only exist if there's an open
      document, which means they cannot be configured or placed in
      toolbars. We should only have per-window actions, not per-action
      actions.
      
      Creating the actions in the toolfactory instead of the tool when
      the window is created fixes that: now the tools will retrieve
      the actions from the global action collection on activations
      and de-activation, like the freehand tool already did for increase
      and decrease brush size.
      
      Note: this commit breaks the following tools because it's not
      worth porting hidden tools in any case:
      
      * artistic text tool
      * odf text tool
      * connection tool
      
      BUG:365222
      
      CMAIL:kimageshop@kde.org
      5f91230f
  6. 28 Nov, 2018 1 commit
  7. 07 Oct, 2018 1 commit
  8. 05 Aug, 2018 1 commit
  9. 31 Jul, 2018 1 commit
    • Halla Rempt's avatar
      Create vector selections and layers are created with a KoShapeControllerBase · e4e21bb9
      Halla Rempt authored
      A KoShapeControllerBase (formerly known as KoShapeBasedDocumentBase)
      is necessary otherwise KoShapeController::resourceManager might return
      0, which causes asserts and crashes. So, pass the KoShapeControllerBase
      down all the way from KisShapeLayer and KisShapeSelection.
      
      This fixes the KisKraSaverTest
      e4e21bb9
  10. 02 Jan, 2018 1 commit
  11. 19 Jul, 2017 1 commit
  12. 30 Jun, 2017 1 commit
  13. 26 Jun, 2017 5 commits
    • Halla Rempt's avatar
    • Halla Rempt's avatar
      Remove the triple-click event from KoToolBase · 0a2002ff
      Halla Rempt authored
      This was added in
      
      commit a7a75f0056abf59cbce27957ab7fb0b6e64e2cb2
      Author: C. Boemann <cbo@boemann.dk>
      Date:   Thu Jan 12 22:13:26 2012 +0100
      
      to make it possible to select text with triple-click. It broke
      Krita, so was worked around in
      
      commit e2ccd93765584816da70af5747e7ef7b1ce71422
      Author: Dmitry Kazakov <dimula73@gmail.com>
      Date:   Thu Dec 12 17:17:37 2013 +0400
      
          Fix too fast mouse clicks (triple clicks) issue
      
          BUG:328358
      
      And we just don't need it at all anymore now that the text tool
      is deprecated.
      0a2002ff
    • Halla Rempt's avatar
      Remove KoToolBaste::updateShapeController: it is unused · 9038b4cc
      Halla Rempt authored
      /// Ultimately only called from Calligra Sheets
      void KoToolBase::updateShapeController(KoShapeBasedDocumentBase *shapeController)
      ...
      9038b4cc
    • Halla Rempt's avatar
      Remove WheelEvent from the KoTool system · 89886ba2
      Halla Rempt authored
      It was only ever implemented in the KoZoomTool:
      
      void KoZoomTool::wheelEvent(KoPointerEvent *event)
      {
          // Let KoCanvasController handle this
          event->ignore();
      }
      89886ba2
    • Halla Rempt's avatar
      Remove QTouchEvent from the KoTool system · a5321ecd
      Halla Rempt authored
      This was only used to send touch events to the transform tool,
      but no touch events ever entered this system, since they are
      filtered by the pan and zoom canvas input actions.
      a5321ecd
  14. 25 May, 2017 1 commit
  15. 08 May, 2017 1 commit
  16. 15 Mar, 2017 1 commit
  17. 14 Mar, 2017 1 commit
  18. 23 Feb, 2017 1 commit
  19. 17 Feb, 2017 1 commit
    • Dmitry Kazakov's avatar
      Implement smooth switching between Selection and Editing tools · eba0ca81
      Dmitry Kazakov authored
      Now possible shortcuts are possible:
      
      * Selection <- Enter    -> Editing
      * Selection <- Esc      -- Editing
      * Selection <- DblClick -> Editing
      * Just select the tool in the toolbox
      
      This path also implements selection of the shapes in
      the Editing tool.
      
      CC:kimageshop@kde.org
      eba0ca81
  20. 23 Dec, 2016 1 commit
    • Dmitry Kazakov's avatar
      A huge KoFlake refactoring to make shape transformations work correctly · 01c32383
      Dmitry Kazakov authored
      1) KoSelection is completely refactored. Now it is always *recursive*.
         More than that, now it automatically tracks the transformation changes
         of the containing shapes (using KoShape::ShapeChangeListener)
      
      2) The size of KoSelection is now automatically tracked as well.
      
      3) A lot of small fixes in DefaultTool transformation strategies. Now
         you can easily transform everything: single shapes, multiple
         selections and groups.
      
      There is still one bug: scaling of multi-object selection works weirdly.
      01c32383
  21. 16 Dec, 2016 1 commit
  22. 06 Jan, 2016 1 commit
    • Michael Abrahams's avatar
      Allow tools to mask synthetic mouse events · 171a9589
      Michael Abrahams authored
      Summary:
      This allows the guides tool (for example) to allow click and drag with touch
      through the synthetic mouse events, while the same mouse events can be
      rejected by the freehand tool.
      
      The only occurrence of synthetic mouse events I've found is in Surface Pro 3
      touch events.
      
      Reviewers: #krita:_next
      
      Differential Revision: https://phabricator.kde.org/D749
      171a9589
  23. 19 Nov, 2015 1 commit
  24. 14 Nov, 2015 1 commit
    • Michael Abrahams's avatar
      Rework shortcut internals · f66f1c76
      Michael Abrahams authored
      Summary: Here is a diff which contains my local work done so far.  Although there is always more work to do to get the internals looking cleaner, I think the core is now in an acceptable state. The primary step after this will be to implement loading and saving.  Once that is finished, schemes support should be straightforward to implement.
      
      Reviewers: rempt
      
      Maniphest Tasks: T947
      
      Differential Revision: https://phabricator.kde.org/D498
      f66f1c76
  25. 21 Oct, 2015 1 commit
  26. 30 Sep, 2015 1 commit
  27. 28 Mar, 2015 1 commit
  28. 04 Mar, 2015 1 commit
  29. 05 Dec, 2014 1 commit
    • Halla Rempt's avatar
      Merge krita-mvc-rempt into master · 1cb2d177
      Halla Rempt authored
      This refactors Krita to allow the user to have more than one
      image open in a window. Krita no longer uses or depends on the
      komain library.
      
      For now, Sketch and Gemini are disabled.
      
      review:119612
      
      Conflicts:
      	krita/ui/kis_view2.cpp
      	krita/ui/tool/kis_delegated_tool.h
      1cb2d177
  30. 27 Sep, 2014 1 commit
  31. 20 Oct, 2013 1 commit
  32. 20 Jun, 2013 1 commit
    • Halla Rempt's avatar
      Rename KoCanvasResourceManager::resourceChanged · 681b2ab8
      Halla Rempt authored
      Rename KoCanvasResourceManager::resourceChanged to canvasResourceChanged.
      This distinguishes this signal from KoDocumentResourceManager::resourceChanged,
      Plan::Project::ResourceChanged, KoAbstractResourceServerAdapter::resourceChanged
      and possibly others.
      681b2ab8
  33. 07 Aug, 2012 1 commit
    • Thorsten Zachmann's avatar
      Fix mixup of canvas and document resource · 860bd864
      Thorsten Zachmann authored
      When investigating the reason for crash for bug 304674 I found out that a very a bug had sneeked in during some refactor of the KoDocumentResourceProvider and KoCanvasResourceProvider. The problem there was that the canvas resource current page had changed and that triggered a repaint which resulted in a crash (Crash fixed by a better fix). However the reason there was a repaint was that the signal for changing the current page resource triggered in KoPathTool::resourceChanged the trigger for HandleRadius as both resource providers did trigger the same slot with oververlapping resources :-(. Seems like this was not the only place where this was done. I have fixed that by adding a second slot for the documentResourceChanged and now the different slots are used for the different resources to no longer mix stuff there. I tried my best to find all occurrences of the problem.
      
      Will wait one week before I backport to 2.5 as asked by boemann.
      
      REVIEW: 105896
      860bd864
  34. 05 May, 2012 1 commit
  35. 07 Feb, 2012 1 commit
    • Halla Rempt's avatar
      Change <QtGui/QDialog> style includes to <QDialog> · 02025cd8
      Halla Rempt authored
      This is already a tiny part of preparation for Qt5, where QtGui is split
      into QtGui and QtWidgets. If we use explicit module names in our includes,
      we are liable to churn like this.
      
      Since KDE applications always have all Qt modules in the include path
      anyway, direct includes always work (both in Qt4 and Qt5), and since we
      already used direct includes in thousands of places, this change makes
      our code more consistent, too.
      02025cd8