diff options
author | Walter Bender <walter@sugarlabs.org> | 2014-03-19 17:17:11 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2014-03-19 17:17:11 (GMT) |
commit | 9c0387c9daae9277ead8e594842d11d6dbed66ec (patch) | |
tree | 986456fbf9305b001e097e1add45f9981dd4265a | |
parent | 1c1751b005d918b8840ccf5a935ea83db57011cf (diff) |
news for v59
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | pippy_app.py | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -2,6 +2,7 @@ BUG FIX: * Fixed "output of the program is not fully displayed" (SL #4661) patch by "native <findathar@gmail.com>" +* Fixed problem with importing sample code into empty notebook 58 diff --git a/pippy_app.py b/pippy_app.py index cf3d172..9c2c749 100644 --- a/pippy_app.py +++ b/pippy_app.py @@ -427,6 +427,9 @@ class PippyActivity(ViewSourceActivity, groupthink.sugar_tools.GroupActivity): _logger.debug('clicked! %s' % value['path']) _file = open(value['path'], 'r') lines = _file.readlines() + # If there are no pages in the notebook, add one. + if self._source_tabs.get_current_page() == -1: + self._add_source_cb(None) text_buffer = self._source_tabs.get_text_buffer() if text_buffer.get_modified(): self._source_tabs.add_tab() |