New batch of "uninitialized values" bugfix. No issue.
This commit is contained in:
@@ -116,32 +116,6 @@ void HSVEqualizer::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void HSVEqualizer::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
sat[i]->setDefault(defParams->hsvequalizer.sat[i]);
|
||||
val[i]->setDefault(defParams->hsvequalizer.val[i]);
|
||||
hue[i]->setDefault(defParams->hsvequalizer.hue[i]);
|
||||
}
|
||||
|
||||
if (pedited) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
sat[i]->setDefaultEditedState(pedited->hsvequalizer.sat[i] ? Edited : UnEdited);
|
||||
val[i]->setDefaultEditedState(pedited->hsvequalizer.val[i] ? Edited : UnEdited);
|
||||
hue[i]->setDefaultEditedState(pedited->hsvequalizer.hue[i] ? Edited : UnEdited);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
sat[i]->setDefaultEditedState(Irrelevant);
|
||||
val[i]->setDefaultEditedState(Irrelevant);
|
||||
hue[i]->setDefaultEditedState(Irrelevant);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Curve listener
|
||||
*
|
||||
@@ -160,58 +134,6 @@ void HSVEqualizer::curveChanged (CurveEditor* ce) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void HSVEqualizer::adjusterChanged (Adjuster* a, double newval) {
|
||||
|
||||
if (listener && enabled->get_active()) {
|
||||
std::stringstream ss;
|
||||
ss << "(";
|
||||
int i;
|
||||
if (hsvchannel->get_active_row_number()==0) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (i > 0) {
|
||||
ss << ", ";
|
||||
}
|
||||
if (i == 4) {
|
||||
ss << "\n";
|
||||
}
|
||||
ss << static_cast<int>(sat[i]->getValue());
|
||||
}
|
||||
ss << ")";
|
||||
listener->panelChanged (EvHSVEqualizerS, ss.str());
|
||||
}
|
||||
else if (hsvchannel->get_active_row_number()==1) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (i > 0) {
|
||||
ss << ", ";
|
||||
}
|
||||
if (i == 4) {
|
||||
ss << "\n";
|
||||
}
|
||||
ss << static_cast<int>(val[i]->getValue());
|
||||
}
|
||||
ss << ")";
|
||||
listener->panelChanged (EvHSVEqualizerV, ss.str());
|
||||
}
|
||||
else if (hsvchannel->get_active_row_number()==2) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (i > 0) {
|
||||
ss << ", ";
|
||||
}
|
||||
if (i == 4) {
|
||||
ss << "\n";
|
||||
}
|
||||
ss << static_cast<int>(hue[i]->getValue());
|
||||
}
|
||||
ss << ")";
|
||||
listener->panelChanged (EvHSVEqualizerH, ss.str());
|
||||
}
|
||||
|
||||
//listener->panelChanged (EvHSVEqualizer, ss.str());
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void HSVEqualizer::colorForValue (double valX, double valY, int callerId, ColorCaller* caller) {
|
||||
|
||||
float r, g, b;
|
||||
|
@@ -751,45 +751,42 @@ void MyDiagonalCurve::pipetteButton1Pressed(EditDataProvider *provider, int modi
|
||||
|
||||
snapToElmt = -100;
|
||||
if (curve.type!=DCT_Parametric) {
|
||||
snapToElmt = -100;
|
||||
if (curve.type!=DCT_Parametric) {
|
||||
std::vector<double>::iterator itx, ity;
|
||||
buttonPressed = true;
|
||||
std::vector<double>::iterator itx, ity;
|
||||
buttonPressed = true;
|
||||
|
||||
// get the pointer position
|
||||
int px = graphX + int(float(graphW)*pipetteVal); // WARNING: converting pipetteVal from float to int, precision loss here!
|
||||
getCursorPosition(Gdk::BUTTON_PRESS, false, px, graphY, Gdk::ModifierType(modifierKey));
|
||||
findClosestPoint();
|
||||
// get the pointer position
|
||||
int px = graphX + int(float(graphW)*pipetteVal); // WARNING: converting pipetteVal from float to int, precision loss here!
|
||||
getCursorPosition(Gdk::BUTTON_PRESS, false, px, graphY, Gdk::ModifierType(modifierKey));
|
||||
findClosestPoint();
|
||||
|
||||
if (distanceX > minDistanceX) {
|
||||
rtengine::DiagonalCurve rtCurve(getPoints(), 200);
|
||||
if (distanceX > minDistanceX) {
|
||||
rtengine::DiagonalCurve rtCurve(getPoints(), 200);
|
||||
|
||||
/* insert a new control point */
|
||||
if (num > 0) {
|
||||
if (clampedX > curve.x[closest_point])
|
||||
++closest_point;
|
||||
}
|
||||
itx = curve.x.begin();
|
||||
ity = curve.y.begin();
|
||||
for (int i=0; i<closest_point; i++) { itx++; ity++; }
|
||||
curve.x.insert (itx, 0);
|
||||
curve.y.insert (ity, 0);
|
||||
num++;
|
||||
|
||||
// the graph is refreshed only if a new point is created (snaped to a pixel)
|
||||
curve.x[closest_point] = clampedX;
|
||||
curve.y[closest_point] = clampedY = rtCurve.getVal(pipetteVal);
|
||||
|
||||
curveIsDirty = true;
|
||||
setDirty(true);
|
||||
draw (closest_point);
|
||||
notifyListener ();
|
||||
/* insert a new control point */
|
||||
if (num > 0) {
|
||||
if (clampedX > curve.x[closest_point])
|
||||
++closest_point;
|
||||
}
|
||||
grab_point = closest_point;
|
||||
lit_point = closest_point;
|
||||
ugpX = curve.x[closest_point];
|
||||
ugpY = curve.y[closest_point];
|
||||
itx = curve.x.begin();
|
||||
ity = curve.y.begin();
|
||||
for (int i=0; i<closest_point; i++) { itx++; ity++; }
|
||||
curve.x.insert (itx, 0);
|
||||
curve.y.insert (ity, 0);
|
||||
num++;
|
||||
|
||||
// the graph is refreshed only if a new point is created (snaped to a pixel)
|
||||
curve.x[closest_point] = clampedX;
|
||||
curve.y[closest_point] = clampedY = rtCurve.getVal(pipetteVal);
|
||||
|
||||
curveIsDirty = true;
|
||||
setDirty(true);
|
||||
draw (closest_point);
|
||||
notifyListener ();
|
||||
}
|
||||
grab_point = closest_point;
|
||||
lit_point = closest_point;
|
||||
ugpX = curve.x[closest_point];
|
||||
ugpY = curve.y[closest_point];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -849,7 +846,7 @@ void MyDiagonalCurve::pipetteButton1Released(EditDataProvider *provider) {
|
||||
draw (lit_point);
|
||||
}
|
||||
grab_point = -1;
|
||||
notifyListener ();
|
||||
//notifyListener ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#include "imagearea.h"
|
||||
#include "cursormanager.h"
|
||||
|
||||
PreviewWindow::PreviewWindow () : previewHandler(NULL), mainCropWin(NULL), imageArea(NULL), isMoving(false), zoom(0.0) {
|
||||
PreviewWindow::PreviewWindow () : previewHandler(NULL), mainCropWin(NULL), imageArea(NULL), isMoving(false), imgX(0), imgY(0), imgW(0), imgH(0), zoom(0.0) {
|
||||
|
||||
rconn = signal_size_allocate().connect( sigc::mem_fun(*this, &PreviewWindow::on_resized) );
|
||||
}
|
||||
|
@@ -71,16 +71,19 @@ class ToolPanel {
|
||||
ToolPanel () : listener(NULL), tmp(NULL), batchMode(false), multiImage(false) {}
|
||||
virtual ~ToolPanel() {}
|
||||
|
||||
void setParent (Gtk::Box* parent) {}
|
||||
Gtk::Box* getParent () { return NULL; }
|
||||
void setMultiImage (bool m) { multiImage = m; }
|
||||
void setListener (ToolPanelListener* tpl) { listener = tpl; }
|
||||
virtual void setEditProvider (EditDataProvider *provider) {}
|
||||
virtual void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL) {}
|
||||
virtual void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL) {}
|
||||
virtual void trimValues (rtengine::procparams::ProcParams* pp) { return; }
|
||||
virtual void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL) {}
|
||||
virtual void autoOpenCurve () {}
|
||||
virtual void setParent (Gtk::Box* parent) {}
|
||||
virtual Gtk::Box* getParent () { return NULL; }
|
||||
virtual Gtk::Expander* getExpander () { return NULL; }
|
||||
virtual void setExpanded (bool expanded) {}
|
||||
virtual bool getExpanded () { return false; }
|
||||
void setMultiImage (bool m) { multiImage = m; }
|
||||
void setListener (ToolPanelListener* tpl) { listener = tpl; }
|
||||
virtual void setEditProvider (EditDataProvider *provider) {}
|
||||
virtual void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL) {}
|
||||
virtual void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL) {}
|
||||
virtual void trimValues (rtengine::procparams::ProcParams* pp) { return; }
|
||||
virtual void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL) {}
|
||||
virtual void autoOpenCurve () {}
|
||||
|
||||
/** @brief Disable the event broadcasting mechanism
|
||||
*
|
||||
@@ -98,15 +101,18 @@ class ToolPanel {
|
||||
|
||||
class FoldableToolPanel : public ToolPanel {
|
||||
|
||||
protected:
|
||||
protected:
|
||||
Gtk::Box* parentContainer;
|
||||
void foldThemAll (GdkEventButton* event);
|
||||
Gtk::Expander* exp;
|
||||
|
||||
public:
|
||||
Gtk::Expander* exp;
|
||||
|
||||
FoldableToolPanel(Gtk::Box* content);
|
||||
|
||||
Gtk::Expander * getExpander() { return exp; }
|
||||
void setExpanded (bool expanded) { if (exp) exp->set_expanded( expanded ); }
|
||||
bool getExpanded () { if (exp) return exp->get_expanded(); return false; }
|
||||
void setParent (Gtk::Box* parent) { parentContainer = parent; }
|
||||
Gtk::Box* getParent () { return parentContainer; }
|
||||
void setLabel (Glib::ustring label, bool need100Percent=false);
|
||||
|
@@ -213,8 +213,8 @@ void ToolPanelCoordinator::addPanel (Gtk::Box* where, FoldableToolPanel* panel,
|
||||
panel->setParent(where);
|
||||
panel->setLabel(escapeHtmlChars(label), need100Percent);
|
||||
|
||||
expList.push_back (panel->exp);
|
||||
where->pack_start(*panel->exp, false, false);
|
||||
expList.push_back (panel->getExpander());
|
||||
where->pack_start(*panel->getExpander(), false, false);
|
||||
}
|
||||
|
||||
ToolPanelCoordinator::~ToolPanelCoordinator () {
|
||||
@@ -542,18 +542,18 @@ void ToolPanelCoordinator::updateCurveBackgroundHistogram (LUTu & histToneCurve,
|
||||
|
||||
void ToolPanelCoordinator::foldAllButOne (Gtk::Box* parent, FoldableToolPanel* openedSection) {
|
||||
|
||||
FoldableToolPanel* currentTP;
|
||||
|
||||
for (size_t i=0; i<toolPanels.size(); i++) {
|
||||
currentTP = static_cast<FoldableToolPanel*>(toolPanels[i]);
|
||||
if (currentTP->getParent() == parent) {
|
||||
// Section in the same tab, we unfold it if it's not the one that has been clicked
|
||||
if (currentTP != openedSection) {
|
||||
currentTP->exp->set_expanded(false);
|
||||
}
|
||||
else {
|
||||
if (!currentTP->exp->get_expanded())
|
||||
currentTP->exp->set_expanded(true);
|
||||
for (size_t i=0; i<toolPanels.size(); i++) {
|
||||
if (toolPanels[i]->getParent() != NULL) {
|
||||
ToolPanel* currentTP = toolPanels[i];
|
||||
if (currentTP->getParent() == parent) {
|
||||
// Section in the same tab, we unfold it if it's not the one that has been clicked
|
||||
if (currentTP != openedSection) {
|
||||
currentTP->setExpanded(false);
|
||||
}
|
||||
else {
|
||||
if (!currentTP->getExpanded())
|
||||
currentTP->setExpanded(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -561,8 +561,8 @@ void ToolPanelCoordinator::foldAllButOne (Gtk::Box* parent, FoldableToolPanel* o
|
||||
|
||||
bool ToolPanelCoordinator::handleShortcutKey (GdkEventKey* event) {
|
||||
|
||||
//bool ctrl = event->state & GDK_CONTROL_MASK; temporarilly removed because unused
|
||||
//bool shift = event->state & GDK_SHIFT_MASK; temporarilly removed because unused
|
||||
//bool ctrl = event->state & GDK_CONTROL_MASK; temporarily removed because unused
|
||||
//bool shift = event->state & GDK_SHIFT_MASK; temporarily removed because unused
|
||||
bool alt = event->state & GDK_MOD1_MASK;
|
||||
|
||||
if (alt){
|
||||
@@ -627,16 +627,16 @@ void ToolPanelCoordinator::toolSelected (ToolMode tool) {
|
||||
GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected
|
||||
switch (tool) {
|
||||
case TMCropSelect:
|
||||
crop->exp->set_expanded(true);
|
||||
crop->setExpanded(true);
|
||||
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(*transformPanelSW));
|
||||
break;
|
||||
case TMSpotWB:
|
||||
whitebalance->exp->set_expanded(true);
|
||||
whitebalance->setExpanded(true);
|
||||
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(*colorPanelSW));
|
||||
break;
|
||||
case TMStraighten:
|
||||
lensgeom->exp->set_expanded(true);
|
||||
rotate->exp->set_expanded(true);
|
||||
lensgeom->setExpanded(true);
|
||||
rotate->setExpanded(true);
|
||||
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(*transformPanelSW));
|
||||
break;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user