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

Method paste

src/laybasic/laybasic/layLayoutViewBase.cc:5640–5666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5638}
5639
5640void
5641LayoutViewBase::paste ()
5642{
5643 clear_selection ();
5644
5645 {
5646 db::Transaction trans (manager (), tl::to_string (tr ("Paste")));
5647
5648 // let the receivers sort out who is pasting what ..
5649 do_paste ();
5650 lay::Editables::paste ();
5651 }
5652
5653 // if we change the state, save it before
5654 store_state ();
5655
5656 db::DBox sel_bbox = selection_bbox ();
5657 if (! sel_bbox.empty ()) {
5658 if (m_paste_display_mode == 1 || (m_paste_display_mode == 2 && sel_bbox.is_point ())) {
5659 // just make selection visible, i.e. shift window somewhat
5660 pan_center (sel_bbox.center ());
5661 } else if (m_paste_display_mode == 2) {
5662 // or: make selection fit into the screen
5663 zoom_fit_sel ();
5664 }
5665 }
5666}
5667
5668void
5669LayoutViewBase::paste_interactive (bool transient_mode)

Callers

nothing calls this directly

Calls 11

clear_selectionFunction · 0.85
pasteFunction · 0.85
store_stateFunction · 0.85
selection_bboxFunction · 0.85
zoom_fit_selFunction · 0.85
is_pointMethod · 0.80
centerMethod · 0.80
managerFunction · 0.70
to_stringFunction · 0.50
trFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected