vcs: Cleanup "CommitOptionsPanel" - fix warnings

GitOrigin-RevId: f4b9e7dc9ac52393d0399afbafe0d0af07bf2595
This commit is contained in:
Konstantin Kolosovsky
2019-08-01 22:01:30 +03:00
committed by intellij-monorepo-bot
parent 7d695cabb5
commit fb0f9bb364

View File

@@ -50,7 +50,7 @@ class CommitOptionsPanel(private val actionNameSupplier: () -> String) : BorderL
} }
override fun setVisible(vcses: Collection<AbstractVcs<*>>) = override fun setVisible(vcses: Collection<AbstractVcs<*>>) =
perVcsOptionsPanels.forEach { vcs, vcsPanel -> vcsPanel.isVisible = vcs in vcses } perVcsOptionsPanels.forEach { (vcs, vcsPanel) -> vcsPanel.isVisible = vcs in vcses }
private fun setVcsOptions(newOptions: Map<AbstractVcs<*>, RefreshableOnComponent>) { private fun setVcsOptions(newOptions: Map<AbstractVcs<*>, RefreshableOnComponent>) {
if (vcsOptions != newOptions) { if (vcsOptions != newOptions) {
@@ -59,7 +59,7 @@ class CommitOptionsPanel(private val actionNameSupplier: () -> String) : BorderL
vcsOptionsPanel.removeAll() vcsOptionsPanel.removeAll()
vcsOptions += newOptions vcsOptions += newOptions
vcsOptions.forEach { vcs, options -> vcsOptions.forEach { (vcs, options) ->
val panel = verticalPanel(vcs.displayName).apply { add(options.component) } val panel = verticalPanel(vcs.displayName).apply { add(options.component) }
vcsOptionsPanel.add(panel) vcsOptionsPanel.add(panel)
perVcsOptionsPanels[vcs] = panel perVcsOptionsPanels[vcs] = panel