X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsmoothcontrol.cpp;h=293e0b3dcba7bf985dfe59904ad5fb7ae01682c3;hb=0639a524acf40293d79ebb65b20c27385a82431e;hp=e878ed850a76d9432368d280bf2d47dd5174af10;hpb=eb9a95ca4acbbdbc6c17acd6b8a135deab906f39;p=libs%2Fgui.git diff --git a/source/smoothcontrol.cpp b/source/smoothcontrol.cpp index e878ed8..293e0b3 100644 --- a/source/smoothcontrol.cpp +++ b/source/smoothcontrol.cpp @@ -27,6 +27,18 @@ SmoothControl::SmoothControl(Device &d, ControlSrcType t, unsigned i): paired_ctrl(0) { } +SmoothControl &SmoothControl::operator=(const SmoothControl &sc) +{ + Control::operator=(sc); + + return *this; +} + +SmoothControl::~SmoothControl() +{ + pair(0); +} + void SmoothControl::pair(SmoothControl *ctrl) { if(ctrl==paired_ctrl) @@ -34,8 +46,9 @@ void SmoothControl::pair(SmoothControl *ctrl) if(paired_ctrl) { + SmoothControl *old_pair=paired_ctrl; paired_ctrl=0; - paired_ctrl->pair(0); + old_pair->pair(0); } paired_ctrl=ctrl;