Adjust selected curve point more accurately by using spin boxes
ClosedPublic

Authored by mscaliskan on Oct 7 2018, 12:06 PM.

Details

Summary

In order to adjust selected curve point accurately, spin boxes are added
on x and y domain. Selected curve point can be re-positioned by editing
these spin boxes.

For non-numeric values and where the maximum value is 1.0, percentage
is used; for time values in seconds, milliseconds is used. In
order to emphasize this, suffixes are added to spin boxes.

BUG: 396528

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mscaliskan requested review of this revision.Oct 7 2018, 12:06 PM
mscaliskan created this revision.
mscaliskan edited the summary of this revision. (Show Details)
mscaliskan edited the summary of this revision. (Show Details)Oct 7 2018, 12:09 PM
scottpetrovic added a subscriber: scottpetrovic.

This seems like it works perfect for me. I am approving it on my end.

From a committer standpoint, we will have to figure out out to merge things if/when this gets approved. We have 3 brush editor change sets right now that are going to all have conflicts.

This revision is now accepted and ready to land.Oct 7 2018, 1:27 PM

Instead of duplicating the code over and over, you should consider to add default values in the parent class.

Wouldn't it be possible to use the real min and max values instead of adding a new min/max?

rempt added a subscriber: rempt.Oct 7 2018, 3:14 PM

Yes, I agree with slangkamp: this kind of code duplication is something we want to avoid.

Thank you very much for your prompt review and comments.

For code duplications, I made them pure virtual in order to force new inheritance to be aware of these methods. If there won't be a problem for new inheritance, I can add default values (mostly 0-100 and %) in the base class. Please advice.

For real min/max values; unfortunately, real min/max values usually do not match with the y_min and y_max labels (for example, real values are 0.0 and 1.0 but, labels are -180° and 180°).

mscaliskan updated this revision to Diff 43141.Oct 8 2018, 5:26 PM

Common usage moved to base and duplicated overrides removed.
Spaces between suffixes and values are edited.

rempt accepted this revision.Oct 10 2018, 2:48 PM

There still some cleaning up to do; all the places where the only change is whitespace shouldn't be in the patch. I haven't got problems with the actual code anymore, other than stylistic issues. Please fix those, and then let's merge it :-)

plugins/paintops/libpaintop/kis_pressure_hsv_option.cpp
152

Coding style: space between if and (, and brackets on the same line as the if statement. See https://community.kde.org/Policies/Kdelibs_Coding_Style#Braces .

mscaliskan updated this revision to Diff 43342.Oct 10 2018, 7:04 PM

Whitespace commits are removed,
Coding style is fixed.

This revision was automatically updated to reflect the committed changes.