Bug 411767

Summary: Filter Layers - Levels: Histogram does not show input but output values
Product: [Applications] krita Reporter: Strongheart <strongheart_1>
Component: Filter LayersAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: ahab.greybeard
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Simple Krita document with filter layer (Levels)
Filter Layer Properties dialog at step 2
Filter Layer Properties dialog at step 3

Description Strongheart 2019-09-09 19:18:57 UTC
Created attachment 122567 [details]
Simple Krita document with filter layer (Levels)

SUMMARY
When editing the properties of an existing filter layer (levels), the histogram in the filter layer properties dialog does not correctly show the input values but rather the output values after being processed with the current parameters. 

STEPS TO REPRODUCE
1. Open attached document:"FilterLayerTest.kra"
2. Open the properties dialog for the filter layer "Layer 1 (Levels)" and check the displayed histogram.
3. In the properties dialog: change the maximum input level from 255 to a lower level, e.g. 126, close the dialog by clicking "OK", open the dialog again and check the displayed histogram. 

OBSERVED RESULT
The histogram in the properties dialog shows different values at step 3 than at step 2.

EXPECTED RESULT
The histogram in the properties dialog shall always show the  input values (= the values before the filter has been applied).

SOFTWARE/OS VERSIONS
Krita

 Version: 4.3.0-prealpha (git ca902a4)
 Languages: en_CA
 Hidpi: false

Qt

  Version (compiled): 5.12.4
  Version (loaded): 5.12.4

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.15.0-60-generic
  Pretty Productname: Linux Mint 18.3
  Product Type: linuxmint
  Product Version: 18.3

ADDITIONAL INFORMATION
Comment 1 Strongheart 2019-09-09 19:22:19 UTC
Created attachment 122568 [details]
Filter Layer Properties dialog at step 2
Comment 2 Strongheart 2019-09-09 19:23:10 UTC
Created attachment 122569 [details]
Filter Layer Properties dialog at step 3
Comment 3 Ahab Greybeard 2019-09-11 16:41:41 UTC
I can confirm that this is the case as reported.

Also, if a filter mask is used, instead of a filter layer, the filter mask properties show the histogram of the layer itself before the effects of the mask are applied, in accordance with the OP's Expected Result for a filter layer.