created a Logarythmic scale view for color adjustment curves . Can be toggled on/off .
Diff Detail
- Repository
- R37 Krita
- Lint
Lint Skipped - Unit
Unit Tests Skipped
This fails to build for me:
[ 76%] Building CXX object plugins/filters/colorsfilters/CMakeFiles/kritacolorsfilters.dir/kis_brightness_contrast_filter.cpp.o
/home/boud/dev/master/plugins/filters/colorsfilters/kis_perchannel_filter.cpp: In member function ‘virtual void KisPerChannelConfigWidget::setActiveChannel(int)’:
/home/boud/dev/master/plugins/filters/colorsfilters/kis_perchannel_filter.cpp:228:49: error: no matching function for call to ‘KisPerChannelConfigWidget::getHistogram()’
m_page->curveWidget->setPixmap(getHistogram()); ^
/home/boud/dev/master/plugins/filters/colorsfilters/kis_perchannel_filter.cpp:228:49: note: candidate is:
/home/boud/dev/master/plugins/filters/colorsfilters/kis_perchannel_filter.cpp:171:16: note: QPixmap KisPerChannelConfigWidget::getHistogram(bool)
inline QPixmap KisPerChannelConfigWidget::getHistogram(bool logarithmic)
^
/home/boud/dev/master/plugins/filters/colorsfilters/kis_perchannel_filter.cpp:171:16: note: candidate expects 1 argument, 0 provided
plugins/filters/colorsfilters/CMakeFiles/kritacolorsfilters.dir/build.make:154: recipe for target 'plugins/filters/colorsfilters/CMakeFiles/kritacolorsfilters.dir/kis_perchannel_filter.cpp.o' failed
make[2]: * [plugins/filters/colorsfilters/CMakeFiles/kritacolorsfilters.dir/kis_perchannel_filter.cpp.o] Error 1
make[2]: * Waiting for unfinished jobs....
sorry i made an error while creating the diff . It was building well for me originally . So now it should build
Okay, works fine now! Please get a developer account and push the commit (https://techbase.kde.org/Contribute/Get_a_Contributor_Account)
There is a bug in the patch. The histogram gets updated wrongly when one switches the channels. That happens because getHistogram() uses default argument, and it shouldn't.
plugins/filters/colorsfilters/kis_perchannel_filter.h | ||
---|---|---|
122 | Don't add default argument here, it should be chosen accordingly every time by the calling code |
I think you need to explain why you feel that is necessary. I don't think it matters a lot.
Because you get into inconsistent state, with the checkbox pressed, but the histogram being in non-logarithmic scale.
Steps to reproduce:
- Select R channel
- Click on Logarithmic to enable it, Histogram is in logarithmic mode, which is correct
- Select G channel. The checkbox is still in checked state, but the histogram is in linear mode, which is a bug.
Unchecking+checking the checkbox fixes the issue
Hi, @shreyasr!
The patch looks and works perfectly fine now! :) Please apply for a developer account (if you haven't yet) and push your patch! :)