Skip to content

Fill and Selection tools

Things to do:

  • USE SIGNAL COMPRESSOR ON DUMMIES in both tool_fill and tool_select_X
  • Add new sample option in Tool Options docker
  • Make Fill Tool work with labeled layers
  • Add choice of the color of the label for the Sample Color Labeled Layers
  • Add multiple labels choice to the constructor of the Command
  • Connect combobox to the dummies facade in Fill Tool
  • Connect combobox to the dummies facade in SimColSel Tool
  • Connect combobox to the dummies facade in magic wand Tool
  • Connect combobox to the dummies facade in magnetic Tool
  • KisImageSP and KisPaintDeviceSP must be created only if needed in Fill Tool
  • KisImageSP and KisPaintDeviceSP must be created only if needed in SimColSel Tool
  • KisImageSP and KisPaintDeviceSP must be created only if needed in magic wand Tool
  • KisImageSP and KisPaintDeviceSP must be created only if needed in magnetic Tool
  • remove all traces of m_unmerged etc. in Fill Tool
  • remove all traces of m_unmerged etc. in SimColSel Tool
  • remove all traces of m_unmerged etc. in magic wand Tool
  • remove all traces of m_unmerged etc. in magnetic Tool
  • Add documentation to all new code
  • add unit tests to all new code
  • possibly think about adding documentation to all code you've read and understood :)
  • Make sure that the combobox doesn't have the pie diagram but just rectangles (because it's big and it can) and get rid of the filter icon, of course it must still work on the other usage
  • Rewrite Combobox to work on dummies facade instead of nodes
  • refactor tool_select_X to use commands and applicators instead of just a barrier lock
  • Replace the unnecessary code finding the proper index with QComboBox::findData()

Functionalities

  • Color Labels choice in Fill Tool options

  • Settings are remembered between openings of Krita in Fill Tool options (except for the choice of color labels?)

  • Working color labels choice in Fill Tool options

  • Color Labels choice in Contiguous Selection Tool options

  • Settings are remembered between openings of Krita in Contiguous Selection Tool options

  • Working color labels choice in Contiguous Selection Tool options

  • Color Labels choice in Magnetic Selection Tool options

  • Settings are remembered between openings of Krita in Magnetic Selection Tool options

  • Working color labels choice in Magnetic Selection Tool options

  • Color Labels choice in Similar Colors Selection Tool options

  • Settings are remembered between openings of Krita in Similar Colors Selection Tool options

  • Working color labels choice in Similar Colors Selection Tool options

What should I do to make it prettier:

  • Color Combobox: use rectangles instead of the circle
  • Color Combobox: use a different icon instead of filtering one
  • I could, potentially, not ignore "use merged" in Tool Contiguous as I do in Fill Tool
  • Automatic selecting the only label in labels combobox when the image has only one
  • Potentially: remove All option... but it still can be useful, I guess

Test Plan

Test file: filltooltest_newoption_001.kra And even better one: selection_tool_new_features_test_001.kra

  1. Pressing into those places with all types of sampling layers in both fill tool and magic wand
  2. setting type of sampling layers, closing document, opening document - it should stay the same

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Agata Cacko

Merge request reports