mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-81554 Database console loses toolbar after detaching and reattaching tab
This commit is contained in:
@@ -551,7 +551,7 @@ public class LanguageConsoleImpl implements Disposable, TypeSafeDataProvider {
|
||||
@Override
|
||||
public void fileClosed(FileEditorManager source, VirtualFile file) {
|
||||
if (file != myFile.getVirtualFile()) return;
|
||||
if (myUiUpdateRunnable != null) {
|
||||
if (myUiUpdateRunnable != null && !Boolean.TRUE.equals(file.getUserData(FileEditorManagerImpl.CLOSING_TO_REOPEN))) {
|
||||
ApplicationManager.getApplication().runReadAction(myUiUpdateRunnable);
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -585,6 +585,7 @@ final class EditorTabbedContainer implements Disposable, CloseAction.CloseTarget
|
||||
public void dragOutFinished(MouseEvent event, TabInfo source) {
|
||||
boolean copy = event.isMetaDown() || (!SystemInfo.isMac && event.isControlDown());
|
||||
if (!copy) {
|
||||
myFile.putUserData(FileEditorManagerImpl.CLOSING_TO_REOPEN, Boolean.TRUE);
|
||||
FileEditorManagerEx.getInstanceEx(myProject).closeFile(myFile, myWindow);
|
||||
}
|
||||
else {
|
||||
@@ -592,6 +593,9 @@ final class EditorTabbedContainer implements Disposable, CloseAction.CloseTarget
|
||||
}
|
||||
|
||||
mySession.process(event);
|
||||
if (!copy) {
|
||||
myFile.putUserData(FileEditorManagerImpl.CLOSING_TO_REOPEN, null);
|
||||
}
|
||||
|
||||
myFile = null;
|
||||
mySession = null;
|
||||
|
||||
+1
@@ -96,6 +96,7 @@ public class FileEditorManagerImpl extends FileEditorManagerEx implements Projec
|
||||
|
||||
private static final FileEditor[] EMPTY_EDITOR_ARRAY = {};
|
||||
private static final FileEditorProvider[] EMPTY_PROVIDER_ARRAY = {};
|
||||
public static final Key<Boolean> CLOSING_TO_REOPEN = Key.create("CLOSING_TO_REOPEN");
|
||||
|
||||
private volatile JPanel myPanels;
|
||||
private EditorsSplitters mySplitters;
|
||||
|
||||
Reference in New Issue
Block a user