| 5638 | } |
| 5639 | |
| 5640 | void |
| 5641 | LayoutViewBase::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 | |
| 5668 | void |
| 5669 | LayoutViewBase::paste_interactive (bool transient_mode) |
nothing calls this directly
no test coverage detected