mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed ipython notebook undo
This commit is contained in:
+2
-9
@@ -19,15 +19,8 @@ public class IpnbMoveCellDownAction extends AnAction {
|
||||
final FileEditor editor = PlatformDataKeys.FILE_EDITOR.getData(context);
|
||||
if (editor instanceof IpnbFileEditor) {
|
||||
final IpnbFilePanel ipnbFilePanel = ((IpnbFileEditor)editor).getIpnbFilePanel();
|
||||
CommandProcessor.getInstance().executeCommand(ipnbFilePanel.getProject(), new Runnable() {
|
||||
public void run() {
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
public void run() {
|
||||
ipnbFilePanel.moveCell(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, "Ipnb.moveCell", new Object());
|
||||
CommandProcessor.getInstance().executeCommand(ipnbFilePanel.getProject(), () -> ApplicationManager.getApplication().runWriteAction(
|
||||
() -> ipnbFilePanel.moveCell(true)), "Ipnb.moveCell", new Object());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ public class IpnbFilePanel extends JPanel implements Scrollable, DataProvider, D
|
||||
alarm.cancelAllRequests();
|
||||
alarm.addRequest(new MySynchronizeRequest(), 10, ModalityState.stateForComponent(IpnbFilePanel.this));
|
||||
}
|
||||
mySynchronize = true;
|
||||
}
|
||||
};
|
||||
myDocument = myParent.getDocument();
|
||||
@@ -469,7 +470,6 @@ public class IpnbFilePanel extends JPanel implements Scrollable, DataProvider, D
|
||||
private class MySynchronizeRequest implements Runnable {
|
||||
|
||||
public void run() {
|
||||
mySynchronize = false;
|
||||
final Project project = getProject();
|
||||
if (project.isDisposed()) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user