mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-55648: always use actual debugger node presentation during update of 'Pin to top' icon on hover
GitOrigin-RevId: d0610b66bd33dfcef8f917895490fec44948964c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e13c5dfd97
commit
5dcfe99b83
+7
-6
@@ -51,20 +51,21 @@ open class XDebuggerPinToTopManager {
|
||||
if (!pinnedValue.canBePinned() || isItemPinned(node)) {
|
||||
return
|
||||
}
|
||||
val valuePresentation = valueNode.valuePresentation ?: return
|
||||
val hasChildren = !valueNode.isLeaf
|
||||
val oldIcon = valueNode.icon
|
||||
var oldIcon = valueNode.icon
|
||||
|
||||
val changeIconLifetime = Disposable {
|
||||
if (node.icon != oldIcon) {
|
||||
node.setPresentation(oldIcon, valuePresentation, hasChildren)
|
||||
val xValuePresentation = node.valuePresentation
|
||||
if (node.icon == PlatformDebuggerImplIcons.PinToTop.UnpinnedItem && xValuePresentation != null) {
|
||||
node.setPresentation(oldIcon, xValuePresentation, !node.isLeaf)
|
||||
}
|
||||
myActiveNode = null
|
||||
}
|
||||
myActiveNode = node
|
||||
|
||||
myPinToTopIconAlarm.addRequest({
|
||||
node.setPresentation(PlatformDebuggerImplIcons.PinToTop.UnpinnedItem, valuePresentation, hasChildren)
|
||||
val xValuePresentation = node.valuePresentation ?: return@addRequest
|
||||
oldIcon = node.icon //update icon with actual value
|
||||
node.setPresentation(PlatformDebuggerImplIcons.PinToTop.UnpinnedItem, xValuePresentation, !node.isLeaf)
|
||||
}, DEFAULT_ICON_DELAY)
|
||||
myNodeHoverLifetime = changeIconLifetime
|
||||
Disposer.register(lifetimeHolder, changeIconLifetime)
|
||||
|
||||
Reference in New Issue
Block a user