diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc5daff3..d396da5b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,6 +102,14 @@ jobs: ref: ${{ inputs.source_sha }} submodules: recursive + # The checkout of a commit detaches HEAD, and the build information then records the branch + # as unknown. A local branch at the same commit, named after the branch that triggered the + # run, gives the build information its name. + - name: Name the branch of the checkout + env: + SOURCE_BRANCH: ${{ github.head_ref || github.ref_name }} + run: git checkout -B $env:SOURCE_BRANCH + - name: Initialize building environment uses: ./.github/actions/initialize-build-environment with: diff --git a/src/plugins/coreplugin/qml/actions/WorkspaceAddOnActions.qml b/src/plugins/coreplugin/qml/actions/WorkspaceAddOnActions.qml index e17631c1..9c0bcc9a 100644 --- a/src/plugins/coreplugin/qml/actions/WorkspaceAddOnActions.qml +++ b/src/plugins/coreplugin/qml/actions/WorkspaceAddOnActions.qml @@ -74,6 +74,17 @@ ActionCollection { id: layouts Instantiator { + model: customLayoutRepeater.count === 0 ? 1 : 0 + delegate: MenuItem { + text: "..." + enabled: false + } + onObjectAdded: (index, object) => layouts.insertItem(0, object) + onObjectRemoved: (index, object) => layouts.removeItem(object) + } + + Instantiator { + id: customLayoutRepeater model: collection.addOn?.workspaceManager?.customLayouts ?? [] delegate: Menu { required property var modelData