Fix crash reported in #2239 + suppress warning from header files
Crash reported here https://github.com/Beep6581/RawTherapee/issues/2239#issuecomment-521585237
This commit is contained in:
@@ -188,8 +188,6 @@ protected:
|
||||
void updateLRGBHistograms ();
|
||||
void setScale (int prevscale);
|
||||
void updatePreviewImage (int todo, bool panningRelatedChange);
|
||||
void setTweakOperator (TweakOperator *tOperator);
|
||||
void unsetTweakOperator (TweakOperator *tOperator);
|
||||
|
||||
MyMutex mProcessing;
|
||||
const std::unique_ptr<ProcParams> params; // used for the rendering, can be eventually tweaked
|
||||
@@ -275,6 +273,8 @@ public:
|
||||
|
||||
DetailedCrop* createCrop (::EditDataProvider *editDataProvider, bool isDetailWindow) override;
|
||||
|
||||
void setTweakOperator (TweakOperator *tOperator) override;
|
||||
void unsetTweakOperator (TweakOperator *tOperator) override;
|
||||
bool getAutoWB (double& temp, double& green, double equal, double tempBias) override;
|
||||
void getCamWB (double& temp, double& green) override;
|
||||
void getSpotWB (int x, int y, int rectSize, double& temp, double& green) override;
|
||||
|
@@ -42,8 +42,8 @@ namespace procparams
|
||||
{
|
||||
|
||||
class ProcParams;
|
||||
class SpotEntry;
|
||||
|
||||
struct SpotEntry;
|
||||
struct DirPyrDenoiseParams;
|
||||
struct SharpeningParams;
|
||||
struct VignettingParams;
|
||||
|
@@ -117,6 +117,8 @@ void Spot::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
|
||||
setEnabled (pp->spot.enabled);
|
||||
lastEnabled = pp->spot.enabled;
|
||||
activeSpot = -1;
|
||||
lastObject = -1;
|
||||
|
||||
if (spots.size() != oldSize) {
|
||||
createGeometry();
|
||||
@@ -430,12 +432,12 @@ void Spot::deleteSelectedEntry()
|
||||
}
|
||||
|
||||
// TODO
|
||||
CursorShape Spot::getCursor (const int objectID)
|
||||
CursorShape Spot::getCursor (int objectID)
|
||||
{
|
||||
return CSHandOpen;
|
||||
}
|
||||
|
||||
bool Spot::mouseOver (const int modifierKey)
|
||||
bool Spot::mouseOver (int modifierKey)
|
||||
{
|
||||
EditDataProvider* editProvider = getEditProvider();
|
||||
|
||||
@@ -485,7 +487,7 @@ bool Spot::mouseOver (const int modifierKey)
|
||||
}
|
||||
|
||||
// Create a new Target and Source point or start the drag of a Target point under the cursor
|
||||
bool Spot::button1Pressed (const int modifierKey)
|
||||
bool Spot::button1Pressed (int modifierKey)
|
||||
{
|
||||
EditDataProvider* editProvider = getEditProvider();
|
||||
|
||||
@@ -521,7 +523,7 @@ bool Spot::button1Released()
|
||||
}
|
||||
|
||||
// Delete a point
|
||||
bool Spot::button2Pressed (const int modifierKey)
|
||||
bool Spot::button2Pressed (int modifierKey)
|
||||
{
|
||||
EditDataProvider* editProvider = getEditProvider();
|
||||
|
||||
@@ -537,7 +539,7 @@ bool Spot::button2Pressed (const int modifierKey)
|
||||
}
|
||||
|
||||
// Create a new Target and Source point or start the drag of a Target point under the cursor
|
||||
bool Spot::button3Pressed (const int modifierKey)
|
||||
bool Spot::button3Pressed (int modifierKey)
|
||||
{
|
||||
EditDataProvider* editProvider = getEditProvider();
|
||||
|
||||
@@ -575,7 +577,7 @@ bool Spot::button3Released()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Spot::drag1 (const int modifierKey)
|
||||
bool Spot::drag1 (int modifierKey)
|
||||
{
|
||||
EditDataProvider *editProvider = getEditProvider();
|
||||
int imW, imH;
|
||||
@@ -656,7 +658,7 @@ bool Spot::drag1 (const int modifierKey)
|
||||
return modified;
|
||||
}
|
||||
|
||||
bool Spot::drag3 (const int modifierKey)
|
||||
bool Spot::drag3 (int modifierKey)
|
||||
{
|
||||
EditDataProvider *editProvider = getEditProvider();
|
||||
int imW, imH;
|
||||
@@ -683,12 +685,12 @@ bool Spot::drag3 (const int modifierKey)
|
||||
return modified;
|
||||
}
|
||||
|
||||
bool Spot::pick2 (const bool picked)
|
||||
bool Spot::pick2 (bool picked)
|
||||
{
|
||||
return pick3 (picked);
|
||||
}
|
||||
|
||||
bool Spot::pick3 (const bool picked)
|
||||
bool Spot::pick3 (bool picked)
|
||||
{
|
||||
EditDataProvider* editProvider = getEditProvider();
|
||||
|
||||
|
38
rtgui/spot.h
38
rtgui/spot.h
@@ -53,7 +53,7 @@
|
||||
* (the point will be deleted on button release).
|
||||
*/
|
||||
|
||||
class Spot : public ToolParamBlock, public FoldableToolPanel, public EditSubscriber, public rtengine::TweakOperator
|
||||
class Spot : public ToolParamBlock, public FoldableToolPanel, public rtengine::TweakOperator, public EditSubscriber
|
||||
{
|
||||
|
||||
private:
|
||||
@@ -93,31 +93,31 @@ public:
|
||||
Spot ();
|
||||
~Spot ();
|
||||
|
||||
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr);
|
||||
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr);
|
||||
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) override;
|
||||
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr) override;
|
||||
|
||||
void enabledChanged ();
|
||||
void enabledChanged () override;
|
||||
|
||||
void setEditProvider (EditDataProvider* provider);
|
||||
void setEditProvider (EditDataProvider* provider) override;
|
||||
|
||||
void setBatchMode (bool batchMode);
|
||||
void setBatchMode (bool batchMode) override;
|
||||
|
||||
// EditSubscriber interface
|
||||
CursorShape getCursor (const int objectID);
|
||||
bool mouseOver (const int modifierKey);
|
||||
bool button1Pressed (const int modifierKey);
|
||||
bool button1Released ();
|
||||
bool button2Pressed (const int modifierKey);
|
||||
bool button3Pressed (const int modifierKey);
|
||||
bool button3Released ();
|
||||
bool drag1 (const int modifierKey);
|
||||
bool drag3 (const int modifierKey);
|
||||
bool pick2 (const bool picked);
|
||||
bool pick3 (const bool picked);
|
||||
void switchOffEditMode ();
|
||||
CursorShape getCursor (int objectID);
|
||||
bool mouseOver (int modifierKey) override;
|
||||
bool button1Pressed (int modifierKey) override;
|
||||
bool button1Released () override;
|
||||
bool button2Pressed (int modifierKey) override;
|
||||
bool button3Pressed (int modifierKey) override;
|
||||
bool button3Released () override;
|
||||
bool drag1 (int modifierKey) override;
|
||||
bool drag3 (int modifierKey) override;
|
||||
bool pick2 (bool picked) override;
|
||||
bool pick3 (bool picked) override;
|
||||
void switchOffEditMode () override;
|
||||
|
||||
//TweakOperator interface
|
||||
void tweakParams(rtengine::procparams::ProcParams& pparams) override;
|
||||
void tweakParams(rtengine::procparams::ProcParams& pparams);
|
||||
|
||||
rtengine::ProcEvent EvSpotEnabled;
|
||||
rtengine::ProcEvent EvSpotEnabledOPA; // used to toggle-on the Spot 'On Preview Adjustment' mode
|
||||
|
Reference in New Issue
Block a user