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

Method clear_selection

src/laybasic/laybasic/layEditable.cc:368–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366}
367
368void
369Editables::clear_selection ()
370{
371 cancel_edits ();
372
373 bool had_transient_selection = false;
374 bool had_selection = false;
375
376 for (iterator e = begin (); e != end (); ++e) {
377 if (e->has_selection ()) {
378 had_selection = true;
379 }
380 if (e->has_transient_selection ()) {
381 had_transient_selection = true;
382 }
383 e->select (db::DBox (), lay::Editable::Reset); // clear selection
384 e->clear_transient_selection ();
385 e->clear_previous_selection ();
386 }
387
388 // send a signal to the observers
389 if (had_transient_selection) {
390 signal_transient_selection_changed ();
391 }
392 if (had_selection) {
393 signal_selection_changed ();
394 }
395}
396
397void
398Editables::select (const db::DBox &box, lay::Editable::SelectionMode mode)

Callers 7

libraries_changedMethod · 0.45
cm_undoMethod · 0.45
cm_undo_listMethod · 0.45
cm_redoMethod · 0.45
cm_redo_listMethod · 0.45
functionMethod · 0.45
handle_clickMethod · 0.45

Calls 9

signal_selection_changedFunction · 0.85
beginFunction · 0.70
endFunction · 0.70
has_selectionMethod · 0.45
selectMethod · 0.45

Tested by

no test coverage detected