Skip to content

Commit

Permalink
Defined action update thread for actions for ScrollToSource
Browse files Browse the repository at this point in the history
Closes #105
  • Loading branch information
leinardi committed Oct 7, 2024
1 parent 1f09943 commit 61a96fe
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.leinardi.pycharm.pylint.actions;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.project.DumbAwareToggleAction;
Expand All @@ -25,12 +26,18 @@
import com.intellij.ui.content.Content;
import com.leinardi.pycharm.pylint.PylintPlugin;
import com.leinardi.pycharm.pylint.toolwindow.PylintToolWindowPanel;
import org.jetbrains.annotations.NotNull;

/**
* Toggle the scroll to source setting.
*/
public final class ScrollToSource extends DumbAwareToggleAction {

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.EDT;
}

@Override
public boolean isSelected(final AnActionEvent event) {
final Project project = PlatformDataKeys.PROJECT.getData(event.getDataContext());
Expand Down

0 comments on commit 61a96fe

Please sign in to comment.