From 63e37795c2ce5729ce5c5855c35b1be8eb18af33 Mon Sep 17 00:00:00 2001 From: Alexander Lobas Date: Mon, 7 May 2018 21:12:45 +0300 Subject: [PATCH] IDEA-186805 Rework plugin page: roll back hover selection --- .../plugins/PluginManagerConfigurableNew.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerConfigurableNew.java b/platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerConfigurableNew.java index ef66df56c426..cd3dce162ce5 100644 --- a/platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerConfigurableNew.java +++ b/platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerConfigurableNew.java @@ -937,7 +937,6 @@ public class PluginManagerConfigurableNew private List myComponents; private CellPluginComponent myHoverComponent; - private int myHoverIndex; private int mySelectionIndex; private int mySelectionLength; @@ -1010,25 +1009,23 @@ public class PluginManagerConfigurableNew @Override public void mouseExited(MouseEvent event) { - /*if (myHoverComponent != null) { + if (myHoverComponent != null) { if (myHoverComponent.getSelection() == SelectionType.HOVER) { myHoverComponent.setSelection(SelectionType.NONE); } myHoverComponent = null; - myHoverIndex = -1; - }*/ + } } @Override public void mouseMoved(MouseEvent event) { - /*if (myHoverComponent == null) { + if (myHoverComponent == null) { CellPluginComponent component = CellPluginComponent.get(event); if (component.getSelection() == SelectionType.NONE) { myHoverComponent = component; - myHoverIndex = getIndex(component); component.setSelection(SelectionType.HOVER); } - }*/ + } } }; @@ -1157,7 +1154,6 @@ public class PluginManagerConfigurableNew public void clear() { myComponents = new ArrayList<>(); myHoverComponent = null; - myHoverIndex = -1; mySelectionIndex = -1; mySelectionLength = 0; myAllSelected = false; @@ -1172,7 +1168,6 @@ public class PluginManagerConfigurableNew myAllSelected = true; myMixSelection = false; myHoverComponent = null; - myHoverIndex = -1; for (CellPluginComponent component : myComponents) { if (component.getSelection() != SelectionType.SELECTION) { @@ -1330,9 +1325,8 @@ public class PluginManagerConfigurableNew private void singleSelection(@NotNull CellPluginComponent component, int index) { mySelectionIndex = index; mySelectionLength = 1; - if (myHoverIndex == index) { + if (myHoverComponent == component) { myHoverComponent = null; - myHoverIndex = -1; } if (component.getSelection() != SelectionType.SELECTION) { component.setSelection(SelectionType.SELECTION);