mirror of
https://github.com/chylex/IntelliJ-Rainbow-Brackets.git
synced 2025-05-29 19:34:08 +02:00
Fix #875 cannot create configurable component
(cherry picked from commit 536f92d89b64539e3d7d4501591a97cd4a1d9c5a)
This commit is contained in:
parent
2fe50bf08a
commit
bc4859c9b6
@ -160,8 +160,8 @@ class RainbowOptionsPanel(
|
|||||||
for (i in 0 until minRange()) {
|
for (i in 0 until minRange()) {
|
||||||
colors[i].isEnabled = rainbowOn
|
colors[i].isEnabled = rainbowOn
|
||||||
colorLabels[i].isEnabled = rainbowOn
|
colorLabels[i].isEnabled = rainbowOn
|
||||||
colors[i].selectedColor = descriptions[i].rainbowColor
|
colors[i].selectedColor = descriptions.indexOfOrNull(i)?.rainbowColor
|
||||||
eventDispatcher.multicaster.selectedOptionChanged(descriptions[i])
|
descriptions.indexOfOrNull(i)?.let { eventDispatcher.multicaster.selectedOptionChanged(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,4 +257,6 @@ class RainbowOptionsPanel(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun <E> List<E>.indexOfOrNull(idx: Int): E? = if (idx < this.size) this[idx] else null
|
Loading…
Reference in New Issue
Block a user