mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[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:
committed by
intellij-monorepo-bot
parent
8b88711321
commit
9aae32ce1e
-2
@@ -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)
|
||||
|
||||
+1
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user