Browse Source

Don't dispatch ChangeEvent in app::Svg* setters, since setters can be called from constructors and events are virtual.

tags/v2.4.0
Andrew Belt 1 year ago
parent
commit
ee3daf49d0
2 changed files with 0 additions and 16 deletions
  1. +0
    -4
      src/app/SvgKnob.cpp
  2. +0
    -12
      src/app/SvgSlider.cpp

+ 0
- 4
src/app/SvgKnob.cpp View File

@@ -35,10 +35,6 @@ void SvgKnob::setSvg(std::shared_ptr<window::Svg> svg) {
// shadow->box = shadow->box.grow(math::Vec(2, 2));

fb->setDirty();

// Dispatch ChangeEvent
ChangeEvent eChange;
onChange(eChange);
}

void SvgKnob::onChange(const ChangeEvent& e) {


+ 0
- 12
src/app/SvgSlider.cpp View File

@@ -27,10 +27,6 @@ void SvgSlider::setBackgroundSvg(std::shared_ptr<window::Svg> svg) {
box.size = background->box.size;
fb->box.size = background->box.size;
fb->setDirty();

// Dispatch ChangeEvent
ChangeEvent eChange;
onChange(eChange);
}


@@ -41,20 +37,12 @@ void SvgSlider::setHandleSvg(std::shared_ptr<window::Svg> svg) {
handle->setSvg(svg);
handle->box.pos = minHandlePos;
fb->setDirty();

// Dispatch ChangeEvent
ChangeEvent eChange;
onChange(eChange);
}


void SvgSlider::setHandlePos(math::Vec minHandlePos, math::Vec maxHandlePos) {
this->minHandlePos = minHandlePos;
this->maxHandlePos = maxHandlePos;

// Dispatch ChangeEvent
ChangeEvent eChange;
onChange(eChange);
}




Loading…
Cancel
Save