Presets bugs: Stylus tip-presets don't change, /-key is broken.
Closed, ResolvedPublic

KisPaintopBox::setCurrentPaintopAndReload() gets called twice when you select a brush (2 resourceSelected() signals).
Putting this at the top of it fixes both bugs for me, but I imagine that it's probably far better to make sure it only gets called once.

if(m_resourceProvider->currentPreset() == preset){
    return;
}
rempt added a comment.Oct 11 2016, 8:51 AM

Hm... Yes -- it would be good to know where the two signals come from. Either it's from the same object, and the same connection gets created twice (then we should make it a unique connection), or it's from two different objects and then we need to figure out what's the right thing to do.

In the meantime, though, a stop-gap fix is very welcome.

rempt added a comment.Oct 14 2016, 8:52 AM

Okay, it's inevitable to do that check -- we have several preset selector widgets, and selecting a preset, sets the current preset on all the other widgets, which then emit a signal to tell the world the preset has been changed. It would be good if that didn't happen, and it's possible to achieve that by blocking signals, but that's not robust: it's always possible something else selects a preset and starts the updating.