Show More
@@ -174,23 +174,15 b' class LeoNode(object, UserDict.DictMixin):' | |||
|
174 | 174 | |
|
175 | 175 | def __get_h(self): return self.p.headString() |
|
176 | 176 | def __set_h(self,val): |
|
177 | print "set head",val | |
|
178 |
c. |
|
|
179 | try: | |
|
180 | c.setHeadString(self.p,val) | |
|
181 | finally: | |
|
182 | c.endUpdate() | |
|
177 | c.setHeadString(self.p,val) | |
|
178 | c.redraw() | |
|
183 | 179 | |
|
184 | 180 | h = property( __get_h, __set_h, doc = "Node headline string") |
|
185 | 181 | |
|
186 | 182 | def __get_b(self): return self.p.bodyString() |
|
187 | 183 | def __set_b(self,val): |
|
188 | print "set body",val | |
|
189 |
c. |
|
|
190 | try: | |
|
191 | c.setBodyString(self.p, val) | |
|
192 | finally: | |
|
193 | c.endUpdate() | |
|
184 | c.setBodyString(self.p, val) | |
|
185 | c.redraw() | |
|
194 | 186 | |
|
195 | 187 | b = property(__get_b, __set_b, doc = "Nody body string") |
|
196 | 188 | |
@@ -265,11 +257,8 b' class LeoNode(object, UserDict.DictMixin):' | |||
|
265 | 257 | |
|
266 | 258 | def go(self): |
|
267 | 259 | """ Set node as current node (to quickly see it in Outline) """ |
|
268 | c.beginUpdate() | |
|
269 |
|
|
|
270 | c.setCurrentPosition(self.p) | |
|
271 | finally: | |
|
272 | c.endUpdate() | |
|
260 | c.setCurrentPosition(self.p) | |
|
261 | c.redraw() | |
|
273 | 262 | |
|
274 | 263 | def script(self): |
|
275 | 264 | """ Method to get the 'tangled' contents of the node |
@@ -337,7 +326,6 b' def workbook_complete(obj, prev):' | |||
|
337 | 326 | |
|
338 | 327 | |
|
339 | 328 | def add_var(varname): |
|
340 | c.beginUpdate() | |
|
341 | 329 | r = rootnode() |
|
342 | 330 | try: |
|
343 | 331 | if r is None: |
@@ -356,7 +344,7 b' def add_var(varname):' | |||
|
356 | 344 | c.setHeadString(p2,varname) |
|
357 | 345 | return LeoNode(p2) |
|
358 | 346 | finally: |
|
359 |
c. |
|
|
347 | c.redraw() | |
|
360 | 348 | |
|
361 | 349 | def add_file(self,fname): |
|
362 | 350 | p2 = c.currentPosition().insertAfter() |
@@ -368,7 +356,6 b' def expose_ileo_push(f, prio = 0):' | |||
|
368 | 356 | |
|
369 | 357 | def push_ipython_script(node): |
|
370 | 358 | """ Execute the node body in IPython, as if it was entered in interactive prompt """ |
|
371 | c.beginUpdate() | |
|
372 | 359 | try: |
|
373 | 360 | ohist = ip.IP.output_hist |
|
374 | 361 | hstart = len(ip.IP.input_hist) |
@@ -393,7 +380,7 b' def push_ipython_script(node):' | |||
|
393 | 380 | if not has_output: |
|
394 | 381 | es('ipy run: %s (%d LL)' %( node.h,len(script))) |
|
395 | 382 | finally: |
|
396 |
c. |
|
|
383 | c.redraw() | |
|
397 | 384 | |
|
398 | 385 | |
|
399 | 386 | def eval_body(body): |
@@ -495,7 +482,6 b' def lee_f(self,s):' | |||
|
495 | 482 | """ |
|
496 | 483 | import os |
|
497 | 484 | |
|
498 | c.beginUpdate() | |
|
499 | 485 | try: |
|
500 | 486 | if s == 'hist': |
|
501 | 487 | wb.ipython_history.b = get_history() |
@@ -533,7 +519,7 b' def lee_f(self,s):' | |||
|
533 | 519 | c.selectPosition(p) |
|
534 | 520 | print "Editing file(s), press ctrl+shift+w in Leo to write @auto nodes" |
|
535 | 521 | finally: |
|
536 |
c. |
|
|
522 | c.redraw() | |
|
537 | 523 | |
|
538 | 524 | |
|
539 | 525 |
General Comments 0
You need to be logged in to leave comments.
Login now