mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEADEV-41812 - New project view: File selection is lost after rename
This commit is contained in:
@@ -1489,6 +1489,18 @@ public class AbstractTreeUi {
|
||||
myInitialized.setDone();
|
||||
}
|
||||
|
||||
|
||||
if (myUpdaterState != null && !myUpdaterState.isProcessingNow()) {
|
||||
UpdaterTreeState oldState = myUpdaterState;
|
||||
if (!myUpdaterState.restore(null)) {
|
||||
setUpdaterState(oldState);
|
||||
}
|
||||
|
||||
if (!isReady()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (myTree.isShowing()) {
|
||||
if (getBuilder().isToEnsureSelectionOnFocusGained() && Registry.is("ide.tree.ensureSelectionOnFocusGained")) {
|
||||
TreeUtil.ensureSelection(myTree);
|
||||
@@ -2868,7 +2880,11 @@ public class AbstractTreeUi {
|
||||
addNext(elementsToSelect, 0, new Runnable() {
|
||||
public void run() {
|
||||
if (getTree().isSelectionEmpty()) {
|
||||
restoreSelection(currentElements);
|
||||
processInnerChange(new Runnable() {
|
||||
public void run() {
|
||||
restoreSelection(currentElements);
|
||||
}
|
||||
});
|
||||
}
|
||||
runDone(onDone);
|
||||
}
|
||||
|
||||
@@ -143,7 +143,9 @@ public class UpdaterTreeState {
|
||||
}
|
||||
|
||||
public boolean restore(@Nullable DefaultMutableTreeNode actionNode) {
|
||||
if (isProcessingNow() || !myCanRunRestore || myUi.hasNodesToUpdate()) return false;
|
||||
if (isProcessingNow() || !myCanRunRestore || myUi.hasNodesToUpdate()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
invalidateToSelectWithRefsToParent(actionNode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user