Skip to content

Commit

Permalink
splash clean bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
idanpa committed Jan 12, 2025
1 parent e103479 commit 329d422
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pypad/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,6 @@ def _execute(self, cell_idx, code=None):
code = self.get_cell_code(cell_idx)
with self.join_edit_block():
self.clear_cell(cell_idx)
if cell_idx == 0 and code == '' and self.table.rows() == 1:
return # keep splash clean
self.executing_animation.start()

self.latex[cell_idx] = ''
Expand Down Expand Up @@ -526,7 +524,11 @@ def _handle_execute_reply(self, msg):
self.executing_animation.stop()
with self.join_edit_block():
if status == 'ok':
self.set_cell_color(self.execute_cell_idx, theme['done_color'])
# keep splash clean:
if self.execute_cell_idx == 0 and self.table.rows() == 1 and self.get_cell_code(self.execute_cell_idx) == '':
self.set_cell_color(self.execute_cell_idx, theme['out_background'])
else:
self.set_cell_color(self.execute_cell_idx, theme['done_color'])
else:
self.set_cell_color(self.execute_cell_idx, theme['error_color'])
if self.execute_cell_idx+1 < self.table.rows():
Expand Down

0 comments on commit 329d422

Please sign in to comment.