mirror of https://github.com/KLayout/klayout.git
Fixed a small bug: when deleting the only top cell, you could not create new cells as an error was issued saying 'no layout present'
This commit is contained in:
parent
bc78f4a0e9
commit
a4467cfd3e
|
|
@ -1230,11 +1230,12 @@ LayoutViewFunctions::do_cm_paste (bool interactive)
|
|||
void
|
||||
LayoutViewFunctions::cm_new_cell ()
|
||||
{
|
||||
lay::CellView cv = view ()->cellview (view ()->active_cellview_index ());
|
||||
if (! cv.is_valid ()) {
|
||||
if (view ()->active_cellview_index () < 0) {
|
||||
throw tl::Exception (tl::to_string (tr ("No layout present to add a cell to")));
|
||||
}
|
||||
|
||||
lay::CellView cv = view ()->cellview (view ()->active_cellview_index ());
|
||||
|
||||
static double s_new_cell_window_size = 2.0;
|
||||
static std::string s_new_cell_cell_name;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue