Don't enter edit mode when changing cell type and preserve renderd.

This commit is contained in:
Brian E. Granger 2014-01-28 20:05:29 -08:00
parent fa0d5b2f1a
commit 4c7ce61011

View File

@ -847,7 +847,6 @@ var IPython = (function (IPython) {
target_cell.code_mirror.clearHistory();
source_element.remove();
this.select(i);
this.edit_mode();
this.set_dirty(true);
};
};
@ -878,7 +877,9 @@ var IPython = (function (IPython) {
target_cell.code_mirror.clearHistory();
source_element.remove();
this.select(i);
this.edit_mode();
if ((source_cell instanceof IPython.TextCell) && source_cell.rendered) {
target_cell.render();
}
this.set_dirty(true);
};
};
@ -910,7 +911,6 @@ var IPython = (function (IPython) {
target_cell.code_mirror.clearHistory();
source_element.remove();
this.select(i);
this.edit_mode();
this.set_dirty(true);
};
};
@ -947,8 +947,10 @@ var IPython = (function (IPython) {
target_cell.code_mirror.clearHistory();
source_element.remove();
this.select(i);
if ((source_cell instanceof IPython.TextCell) && source_cell.rendered) {
target_cell.render();
}
};
this.edit_mode();
this.set_dirty(true);
$([IPython.events]).trigger('selected_cell_type_changed.Notebook',
{'cell_type':'heading',level:level}