[PyCharm] PY-77045 per cell actions toolbar shown only for selected cells / fixed bug with "not shown for newly created cell"

GitOrigin-RevId: b8a1e9a3c456a7bfaebead2131fcef19679cb1d5
This commit is contained in:
Bogdan Kirilenko
2025-01-22 15:54:51 +00:00
committed by intellij-monorepo-bot
parent 8b88711321
commit 9aae32ce1e
2 changed files with 1 additions and 5 deletions
@@ -34,8 +34,6 @@ class EditorCellActionsToolbarManager(private val editor: EditorEx, private val
fun showToolbar(targetComponent: JComponent) {
val actionGroup = getActionGroup(cell.interval.type) ?: return
if (targetComponent.width == 0 || targetComponent.height == 0) return
removeToolbar()
toolbar = JupyterCellActionsToolbar(actionGroup, targetComponent)
@@ -266,7 +266,6 @@ class EditorCellView(
updateFolding()
updateRunButtonVisibility()
myEditorCellFrameManager?.updateMarkdownCellShow(mouseOver || selected)
updateCellActionsToolbarVisibility()
}
fun mouseEntered() {
@@ -274,7 +273,6 @@ class EditorCellView(
updateFolding()
updateRunButtonVisibility()
myEditorCellFrameManager?.updateMarkdownCellShow(mouseOver || selected)
updateCellActionsToolbarVisibility()
}
inline fun <reified T : Any> getExtension(): T? {
@@ -376,7 +374,7 @@ class EditorCellView(
private fun updateCellActionsToolbarVisibility() {
input.cellActionsToolbar ?: return
when (selected || mouseOver) {
when (selected) {
true -> {
val targetComponent = _controllers.filterIsInstance<DataProviderComponent>().firstOrNull()?.retrieveDataProvider() ?: return
input.cellActionsToolbar.showToolbar(targetComponent)