Increase of precision of perspective parameters in UI (issue 1781)

pp3 version change to 307
This commit is contained in:
michael
2013-03-16 19:24:25 -04:00
parent 87ffd572b2
commit c32e2fc20a
4 changed files with 16 additions and 9 deletions

View File

@@ -740,8 +740,8 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, ParamsEdited* p
if (!pedited || pedited->lensProf.useCA) keyFile.set_boolean ("LensProfile", "UseCA", lensProf.useCA);
// save perspective correction
if (!pedited || pedited->perspective.horizontal) keyFile.set_integer ("Perspective", "Horizontal", perspective.horizontal);
if (!pedited || pedited->perspective.vertical) keyFile.set_integer ("Perspective", "Vertical", perspective.vertical);
if (!pedited || pedited->perspective.horizontal) keyFile.set_double ("Perspective", "Horizontal", perspective.horizontal);
if (!pedited || pedited->perspective.vertical) keyFile.set_double ("Perspective", "Vertical", perspective.vertical);
// save C/A correction
if (!pedited || pedited->cacorrection.red) keyFile.set_double ("CACorrection", "Red", cacorrection.red);
@@ -1270,8 +1270,8 @@ if (keyFile.has_group ("LensProfile")) {
// load perspective correction
if (keyFile.has_group ("Perspective")) {
if (keyFile.has_key ("Perspective", "Horizontal")) { perspective.horizontal = keyFile.get_integer ("Perspective", "Horizontal"); if (pedited) pedited->perspective.horizontal = true; }
if (keyFile.has_key ("Perspective", "Vertical")) { perspective.vertical = keyFile.get_integer ("Perspective", "Vertical"); if (pedited) pedited->perspective.vertical = true; }
if (keyFile.has_key ("Perspective", "Horizontal")) { perspective.horizontal = keyFile.get_double ("Perspective", "Horizontal"); if (pedited) pedited->perspective.horizontal = true; }
if (keyFile.has_key ("Perspective", "Vertical")) { perspective.vertical = keyFile.get_double ("Perspective", "Vertical"); if (pedited) pedited->perspective.vertical = true; }
}
// load c/a correction

View File

@@ -565,8 +565,8 @@ public:
class PerspectiveParams {
public:
int horizontal;
int vertical;
double horizontal;
double vertical;
};
/**

View File

@@ -25,10 +25,10 @@ PerspCorrection::PerspCorrection () : Gtk::VBox(), FoldableToolPanel(this) {
set_border_width(4);
horiz = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_HORIZONTAL"), -100, 100, 1, 0));
horiz = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_HORIZONTAL"), -100, 100, 0.1, 0));
horiz->setAdjusterListener (this);
vert = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_VERTICAL"), -100, 100, 1, 0));
vert = Gtk::manage (new Adjuster (M("TP_PERSPECTIVE_VERTICAL"), -100, 100, 0.1, 0));
vert->setAdjusterListener (this);
pack_start (*horiz);

View File

@@ -2,7 +2,14 @@
#define _PPVERSION_
// This number have to be incremented whenever the PP3 file format is modified
#define PPVERSION 306
#define PPVERSION 307
#define PPVERSION_AEXP 301 //value of PPVERSION when auto exposure algorithm was modified
/* Log of version changes
* 307 2013-03-16
* [Perspective] Horizontal and Vertical changed from int to double
* added [Directional Pyramid Denoising] Method, Redchro, Bluechro
* added [RGB Curves] LumaMode
*/
#endif