Logarythmic scale view for color adjustment curves
ClosedPublic

Authored by shreyasr on Jul 11 2017, 2:55 AM.

Details

Reviewers
rempt
dkazakov
Summary

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
shreyasr created this revision.Jul 11 2017, 2:55 AM
Restricted Application added a subscriber: woltherav. · View Herald TranscriptJul 11 2017, 2:55 AM
rempt edited edge metadata.Jul 11 2017, 2:29 PM

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....

shreyasr updated this revision to Diff 16531.Jul 11 2017, 7:04 PM
shreyasr updated this revision to Diff 16534.Jul 11 2017, 7:12 PM

sorry i made an error while creating the diff . It was building well for me originally . So now it should build

rempt accepted this revision.Jul 12 2017, 7:13 AM

Okay, works fine now! Please get a developer account and push the commit (https://techbase.kde.org/Contribute/Get_a_Contributor_Account)

This revision is now accepted and ready to land.Jul 12 2017, 7:13 AM
dkazakov requested changes to this revision.Jul 14 2017, 10:18 AM

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

This revision now requires changes to proceed.Jul 14 2017, 10:18 AM

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.

I think you need to explain why you feel that is necessary. I don't think it matters a lot.

In D6621#125383, @rempt wrote:

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.

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:

  1. Select R channel
  2. Click on Logarithmic to enable it, Histogram is in logarithmic mode, which is correct
  3. 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

shreyasr updated this revision to Diff 16727.Jul 14 2017, 11:28 PM
shreyasr edited edge metadata.

I corrected the mistake .

dkazakov accepted this revision.Jul 18 2017, 10:36 AM

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! :)

This revision is now accepted and ready to land.Jul 18 2017, 10:36 AM