From 1fce6204718c6957726fe4685090bc5b503dc5f3 Mon Sep 17 00:00:00 2001 From: Paalui Date: Wed, 11 Sep 2024 16:40:35 +0200 Subject: [PATCH] Fixed "doubleclicking" on Colorpicker Bug: #315 / #345 / #309 Didn't read all the code so hope i got it right. When you close a colorchannel it saves the atoms to reuse the gradiets. When opening it again it checks if the old atoms are there and it copies the gradient. But it only checks if the atom is there so when you close the channel before it has drawn all gradients, the gradient is undefined but isGradient is true. I made it that it also copies the isGradient value from the old atom instead of just setting it true. --- the-one-true-todey-file-of-cellpond.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/the-one-true-todey-file-of-cellpond.js b/the-one-true-todey-file-of-cellpond.js index df09e37..239bd3a 100644 --- a/the-one-true-todey-file-of-cellpond.js +++ b/the-one-true-todey-file-of-cellpond.js @@ -6607,7 +6607,7 @@ registerRule( const option = createChild(atom, {...COLOURTODE_PICKER_CHANNEL_OPTION, pityTop, pityBottom}) if (oldOptions !== undefined) { - option.isGradient = true + option.isGradient = oldOptions[i].isGradient option.gradient = oldOptions[i].gradient }