Ipnb Fix according to a new api after merge
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Mon, 24 Oct 2016 17:01:22 +0000 (20:01 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Mon, 24 Oct 2016 17:09:51 +0000 (20:09 +0300)
python/ipnb/src/org/jetbrains/plugins/ipnb/editor/actions/IpnbRunCellBaseAction.java
python/ipnb/src/org/jetbrains/plugins/ipnb/editor/panels/IpnbFilePanel.java

index b0452ed5c568722db147151bfbcb283c612dfbc2..f3bffe3a6bcccaf342d24800697824b015e870a6 100644 (file)
@@ -16,7 +16,7 @@ public abstract class IpnbRunCellBaseAction extends AnAction {
   }
 
   public static void runCell(@NotNull final IpnbFilePanel ipnbFilePanel, boolean selectNext) {
-    final IpnbEditablePanel cell = ipnbFilePanel.getSelectedCell();
+    final IpnbEditablePanel cell = ipnbFilePanel.getSelectedCellPanel();
     if (cell == null) return;
     cell.runCell(selectNext);
   }
index d4653a5f8d051ce0038013c0e9e002513055a423..4c3f569f0d36ed42bbb3bf618b802e522cb3a8a4 100644 (file)
@@ -261,7 +261,7 @@ public class IpnbFilePanel extends JPanel implements Scrollable, DataProvider, D
     if (currentCellPanel == null) return;
 
     if (below) {
-      selectNext(currentCellPanel);
+      selectNext(currentCellPanel, false);
     }
     else {
       selectPrev(currentCellPanel);
@@ -279,7 +279,7 @@ public class IpnbFilePanel extends JPanel implements Scrollable, DataProvider, D
 
     currentCellPanel.repaint();
     deleteCell(currentCellPanel);
-    saveToFile();
+    saveToFile(false);
   }
 
   private static ArrayList<String> mergeCellsSource(@NotNull List<String> currentCellSource,
@@ -333,7 +333,7 @@ public class IpnbFilePanel extends JPanel implements Scrollable, DataProvider, D
     panel = createPanel(cell, newCellSource);
     addCell(panel, true);
 
-    saveToFile();
+    saveToFile(false);
   }
 
   @NotNull
@@ -382,7 +382,7 @@ public class IpnbFilePanel extends JPanel implements Scrollable, DataProvider, D
 
     int indexToSelect = index < myIpnbPanels.size() ? index : index-1;
     final IpnbEditablePanel panel = myIpnbPanels.get(indexToSelect);
-    setSelectedCell(panel);
+    setSelectedCell(panel, false);
   }
 
   public void saveToFile(boolean synchronize) {