mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-90579 Tabs: Alphabetical sorting must be OFF by default
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
*/
|
||||
package com.intellij.ui.tabs.impl;
|
||||
|
||||
import com.intellij.ide.IdeBundle;
|
||||
import com.intellij.ide.ui.UISettings;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.ui.InplaceButton;
|
||||
import com.intellij.ui.MouseDragHelper;
|
||||
import com.intellij.ui.ScreenUtil;
|
||||
@@ -224,6 +227,24 @@ class DragHelper extends MouseDragHelper {
|
||||
super.processDragFinish(event, willDragOutStart);
|
||||
|
||||
endDrag(willDragOutStart);
|
||||
|
||||
final int place = UISettings.getInstance().EDITOR_TAB_PLACEMENT;
|
||||
|
||||
if (!willDragOutStart && JBEditorTabs.isAlphabeticalMode() && place != SwingConstants.TOP && place != SwingConstants.BOTTOM) {
|
||||
final Point p = new Point(event.getPoint());
|
||||
SwingUtilities.convertPoint(event.getComponent(), p, myTabs);
|
||||
if (myTabs.getVisibleRect().contains(p)) {
|
||||
final int answer = Messages.showOkCancelDialog(myTabs,
|
||||
IdeBundle.message("alphabetical.mode.is.on.warning"),
|
||||
IdeBundle.message("title.warning"),
|
||||
Messages.getQuestionIcon());
|
||||
if (answer == Messages.OK) {
|
||||
JBEditorTabs.setAlphabeticalMode(false);
|
||||
myTabs.relayout(true, false);
|
||||
myTabs.revalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void endDrag(boolean willDragOutStart) {
|
||||
|
||||
@@ -1091,4 +1091,5 @@ diff.dialog.title=Diff Between ''{0}'' and ''{1}''
|
||||
|
||||
goto.custom.region.command=Go to Custom Region
|
||||
goto.custom.region.message.dumb.mode=Go to Custom Region action is not available until indices are built.
|
||||
goto.custom.region.message.unavailable=There are no custom folding regions in the current file.
|
||||
goto.custom.region.message.unavailable=There are no custom folding regions in the current file.
|
||||
alphabetical.mode.is.on.warning=Alphabetical order for tabs is ON. Switch it OFF?
|
||||
Reference in New Issue
Block a user