MCPcopy Create free account
hub / github.com/KLayout/klayout / del

Method del

src/laybasic/laybasic/layEditable.cc:105–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void
106Editables::del (db::Transaction *transaction)
107{
108 std::unique_ptr<db::Transaction> trans_holder (transaction ? transaction : new db::Transaction (manager (), tl::to_string (tr ("Delete"))));
109
110 if (has_selection ()) {
111
112 try {
113
114 trans_holder->open ();
115
116 cancel_edits ();
117
118 // this dummy operation will update the screen:
119 if (manager ()) {
120 manager ()->queue (this, new db::Op ());
121 }
122
123 for (iterator e = begin (); e != end (); ++e) {
124 e->del ();
125 }
126
127 signal_selection_changed ();
128
129 } catch (...) {
130 trans_holder->cancel ();
131 throw;
132 }
133
134 }
135}
136
137void
138Editables::cut ()

Callers 5

menu_activatedMethod · 0.45
move_macroMethod · 0.45
move_subfolderMethod · 0.45
move_folderMethod · 0.45
delete_button_clickedMethod · 0.45

Calls 10

has_selectionFunction · 0.85
signal_selection_changedFunction · 0.85
managerFunction · 0.70
beginFunction · 0.70
endFunction · 0.70
to_stringFunction · 0.50
trFunction · 0.50
openMethod · 0.45
queueMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected