mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix tabs relayout in some cases (to prevent moving visible tabs) + fix tab order on reopen for "Activate right neighbouring tab on close" option
This commit is contained in:
@@ -294,7 +294,12 @@ public class TabLabel extends JPanel {
|
||||
private void invalidateIfNeeded() {
|
||||
if (myLabel.getRootPane() == null) return;
|
||||
|
||||
if (myLabel.getSize() != null && myLabel.getSize().equals(myLabel.getPreferredSize())) return;
|
||||
Dimension d = myLabel.getSize();
|
||||
Dimension pref = myLabel.getPreferredSize();
|
||||
if (d != null && (d.width >= pref.width && d.height >= pref.height)) {
|
||||
// do not need to invalidate if size is more than preferred size
|
||||
return;
|
||||
}
|
||||
|
||||
setInactiveStateImage(null);
|
||||
|
||||
|
||||
+7
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.fileEditor.impl;
|
||||
|
||||
import com.intellij.ide.ui.UISettings;
|
||||
import com.intellij.openapi.actionSystem.KeyboardShortcut;
|
||||
import com.intellij.openapi.actionSystem.Shortcut;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
@@ -326,8 +327,13 @@ public class EditorsSplitters extends JPanel {
|
||||
window = findWindowWith(panel);
|
||||
}
|
||||
//noinspection unchecked
|
||||
final List<Element> children = leaf.getChildren("file");
|
||||
final List<Element> children = new ArrayList<Element>(leaf.getChildren("file"));
|
||||
VirtualFile currentFile = null;
|
||||
|
||||
if (UISettings.getInstance().ACTIVATE_RIGHT_EDITOR_ON_CLOSE) {
|
||||
Collections.reverse(children);
|
||||
}
|
||||
|
||||
for (final Element file : children) {
|
||||
try {
|
||||
final HistoryEntry entry = new HistoryEntry(getManager().getProject(), file.getChild(HistoryEntry.TAG));
|
||||
|
||||
Reference in New Issue
Block a user