From 23f25ec1128236e341b66785bff30b75d410850c Mon Sep 17 00:00:00 2001 From: Nikita Pavlenko Date: Tue, 6 May 2025 12:01:42 +0200 Subject: [PATCH] [PyCharm] Jupyter (fix): Fixed floating toolbar behavior when toolbar actions changed. #PY-80911 Fixed - Also, toolbars will finally look complete in remote dev - Removed multiple calls to Editor revalidate/repaint (cherry picked from commit af2a30af1b3721ac3b756c2c8d79bb7a1dd079f1) GitOrigin-RevId: d9c2e2f34c2b84180df51869e2bb795419204fd6 --- .../notebooks/visualization/NotebookBelowLastCellPanel.kt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/notebooks/visualization/src/com/intellij/notebooks/visualization/NotebookBelowLastCellPanel.kt b/notebooks/visualization/src/com/intellij/notebooks/visualization/NotebookBelowLastCellPanel.kt index 723b2fb77a85..3a543b9cb10a 100644 --- a/notebooks/visualization/src/com/intellij/notebooks/visualization/NotebookBelowLastCellPanel.kt +++ b/notebooks/visualization/src/com/intellij/notebooks/visualization/NotebookBelowLastCellPanel.kt @@ -9,7 +9,6 @@ import com.intellij.openapi.actionSystem.ActionGroup import com.intellij.openapi.actionSystem.ActionManager import com.intellij.openapi.editor.impl.EditorImpl import com.intellij.util.ui.JBEmptyBorder -import org.intellij.lang.annotations.Language import java.awt.FlowLayout import java.awt.Graphics import java.awt.Graphics2D @@ -30,7 +29,7 @@ class NotebookBelowLastCellPanel( if (editor.isOrdinaryNotebookEditor()) { isOpaque = false border = HighlightableTopBorder(editor.notebookAppearance.cellBorderHeight) - val actionGroup = ActionManager.getInstance().getAction(ACTION_GROUP_ID) as ActionGroup + val actionGroup = ActionManager.getInstance().getAction("Jupyter.CreateNewCellsPanel") as ActionGroup add(JupyterAddNewCellToolbar(actionGroup, toolbarTargetComponent = this)) } } @@ -56,9 +55,4 @@ class NotebookBelowLastCellPanel( } } } - - companion object { - @Language("devkit-action-id") - private const val ACTION_GROUP_ID = "Jupyter.CreateNewCellsPanel" - } } \ No newline at end of file