Merge branch 'master' into pixelshift

This commit is contained in:
heckflosse
2017-01-22 23:06:08 +01:00
26 changed files with 123 additions and 75 deletions

View File

@@ -210,10 +210,10 @@ Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true)
guide->append_text (M("TP_CROP_GTEPASSPORT"));
guide->set_active (0);
w->set_range (0, maxw);
h->set_range (0, maxh);
x->set_range (0, maxw);
y->set_range (0, maxh);
w->set_range (1, maxw);
h->set_range (1, maxh);
x->set_range (0, maxw - 1);
y->set_range (0, maxh - 1);
x->set_digits (0);
x->set_increments (1, 100);
@@ -326,10 +326,10 @@ void Crop::read (const ProcParams* pp, const ParamsEdited* pedited)
guide->set_active (8);
}
x->set_value (pp->crop.x);
y->set_value (pp->crop.y);
w->set_value (pp->crop.w);
h->set_value (pp->crop.h);
x->set_value(pp->crop.x);
y->set_value(pp->crop.y);
w->set_value(std::max(pp->crop.w, 1));
h->set_value(std::max(pp->crop.h, 1));
nx = pp->crop.x;
ny = pp->crop.y;
@@ -706,10 +706,10 @@ void Crop::setDimensions (int mw, int mh)
bool wconnWasBlocked = wconn.block (true);
bool hconnWasBlocked = hconn.block (true);
w->set_range (0, maxw);
h->set_range (0, maxh);
x->set_range (0, maxw);
y->set_range (0, maxh);
w->set_range (1, maxw);
h->set_range (1, maxh);
x->set_range (0, maxw - 1);
y->set_range (0, maxh - 1);
if (!xconnWasBlocked) {
xconn.block (false);

View File

@@ -27,9 +27,10 @@
class CropPanelListener
{
public:
virtual void cropSelectRequested () {}
virtual ~CropPanelListener() = default;
virtual void cropSelectRequested() = 0;
};
class CropRatio
@@ -42,7 +43,6 @@ public:
class Crop : public ToolParamBlock, public CropGUIListener, public FoldableToolPanel, public rtengine::SizeListener
{
protected:
Gtk::CheckButton* fixr;
MyComboBoxText* ratio;
@@ -70,7 +70,6 @@ protected:
std::vector<CropRatio> cropratio;
public:
Crop ();
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr);

View File

@@ -284,8 +284,8 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path
if (
lastdot_pos != Glib::ustring::npos
&& lastdot_pos <= casefolded_path.size() - 4
&& !casefolded_path.compare(lastdot_pos, 4, paramFileExtension))
{
&& !casefolded_path.compare(lastdot_pos, 4, paramFileExtension)
) {
// removing the extension
// now use dot position without casefold()
path = path.substr(0, path.find_last_of('.'));

View File

@@ -998,10 +998,12 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
void Retinex::retinexMethodChanged()
{
if(retinexMethod->get_active_row_number() == 3) {
highl->show();
} else {
highl->hide();
if (!batchMode) {
if(retinexMethod->get_active_row_number() == 3) {
highl->show();
} else {
highl->hide();
}
}
if (listener) {
@@ -1014,28 +1016,29 @@ void Retinex::retinexMethodChanged()
void Retinex::mapMethodChanged()
{
if(mapMethod->get_active_row_number() == 1 /*|| mapMethod->get_active_row_number() == 2*/) {
curveEditormap->show();
highlights->show();
h_tonalwidth->show();
shadows->show();
s_tonalwidth->show();
radius->show();
} else if(mapMethod->get_active_row_number() == 2 || mapMethod->get_active_row_number() == 3) {
curveEditormap->show();
highlights->show();
h_tonalwidth->show();
shadows->show();
s_tonalwidth->show();
radius->hide();
} else {
curveEditormap->hide();
highlights->hide();
h_tonalwidth->hide();
shadows->hide();
s_tonalwidth->hide();
radius->hide();
if (!batchMode) {
if(mapMethod->get_active_row_number() == 1 /*|| mapMethod->get_active_row_number() == 2*/) {
curveEditormap->show();
highlights->show();
h_tonalwidth->show();
shadows->show();
s_tonalwidth->show();
radius->show();
} else if(mapMethod->get_active_row_number() == 2 || mapMethod->get_active_row_number() == 3) {
curveEditormap->show();
highlights->show();
h_tonalwidth->show();
shadows->show();
s_tonalwidth->show();
radius->hide();
} else {
curveEditormap->hide();
highlights->hide();
h_tonalwidth->hide();
shadows->hide();
s_tonalwidth->hide();
radius->hide();
}
}
if (listener) {