goto action: invoke the action after the popup is closed (otherwise e.g. Show Color Picker disappears immediately)

This commit is contained in:
peter
2016-05-30 22:07:52 +02:00
parent f0edfe6027
commit 458ebe771d
@@ -239,7 +239,7 @@ public class GotoActionAction extends GotoActionBase implements DumbAware {
@Nullable AnActionEvent e) {
if (element instanceof OptionDescription) {
final String configurableId = ((OptionDescription)element).getConfigurableId();
TransactionGuard.submitTransaction(project, () ->
TransactionGuard.getInstance().submitTransactionLater(project, () ->
ShowSettingsUtilImpl.showSettingsDialog(project, configurableId, enteredText));
}
else {
@@ -251,7 +251,7 @@ public class GotoActionAction extends GotoActionBase implements DumbAware {
// element could be AnAction (SearchEverywhere)
if (component == null) return;
final AnAction action = element instanceof AnAction ? (AnAction)element : ((GotoActionModel.ActionWrapper)element).getAction();
TransactionGuard.submitTransaction(ApplicationManager.getApplication(), () -> {
TransactionGuard.getInstance().submitTransactionLater(ApplicationManager.getApplication(), () -> {
DataManager instance = DataManager.getInstance();
DataContext context = instance != null ? instance.getDataContext(component) : DataContext.EMPTY_CONTEXT;
InputEvent inputEvent = e == null ? null : e.getInputEvent();