fun selectBranch()

in src/main/kotlin/com/jetbrains/interactiveRebase/visuals/multipleBranches/SidePanel.kt [159:173]


    fun selectBranch(sideBranchPanel: SideBranchPanel) {
        if (canSelectBranch(sideBranchPanel)) {
            // make rest of the branches unavailable if branch is added successfully
            if (sideBranchPanel.selectBranch()) {
                makeBranchesUnavailableExceptCurrent(sideBranchPanel)
                listener.selected = sideBranchPanel
            }
            return
        }
        if (sideBranchPanel.isSelected) {
            // We possibly don't want to unselect the branch only by a single click on the panel, TBD
            // if deselecting was successful then reset all branches visually
            if (sideBranchPanel.deselectBranch()) resetAllBranchesVisually()
        }
    }