Fix PY-21429 Duplicate output in Jupyter Notebook
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Fri, 11 Nov 2016 18:48:42 +0000 (21:48 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Mon, 14 Nov 2016 12:05:32 +0000 (15:05 +0300)
python/ipnb/src/org/jetbrains/plugins/ipnb/editor/panels/code/IpnbCodePanel.java

index d8a149c94689b5ca8aaef6469010f9b2ff7fb562..6c0296bdb664e76092b89740fb01799dd67f7a04 100644 (file)
@@ -308,7 +308,10 @@ public class IpnbCodePanel extends IpnbEditablePanel<JComponent, IpnbCodeCell> {
       }
       if (outputContent != null) {
         myCell.addCellOutput(outputContent);
-        addOutputPanel(myViewPanel, outputContent, outputContent instanceof IpnbOutOutputCell);
+        final JComponent component = myHideableOutputPanel.getSecondComponent();
+        if (component != null) {
+          addOutputPanel(component, outputContent, outputContent instanceof IpnbOutOutputCell);
+        }
       }
       final IpnbFilePanel filePanel = myParent.getIpnbFilePanel();
       filePanel.revalidateAndRepaint();