Fix #3619 and some minor clean-ups

This commit is contained in:
Flössie
2017-01-22 19:28:46 +01:00
parent 3f62b14703
commit 4649e1306f
6 changed files with 25 additions and 20 deletions

View File

@@ -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 (std::max(pp->crop.w,1));
h->set_value (std::max(pp->crop.h,1));
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;

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('.'));