mirror of https://github.com/KLayout/klayout.git
Do not duplicate cells+layers on "Duplicate"
See https://www.klayout.de/forum/discussion/2335 for the rationale
This commit is contained in:
parent
ae48740107
commit
2ae01a3e91
|
|
@ -5297,11 +5297,7 @@ LayoutViewBase::paste_interactive ()
|
|||
|
||||
std::unique_ptr<db::Transaction> trans (new db::Transaction (manager (), tl::to_string (tr ("Paste and move"))));
|
||||
|
||||
{
|
||||
// let the receivers sort out who is pasting what ..
|
||||
do_paste ();
|
||||
lay::Editables::paste ();
|
||||
}
|
||||
lay::Editables::paste ();
|
||||
|
||||
// temporarily close the transaction and pass to the move service for appending it's own
|
||||
// operations.
|
||||
|
|
@ -5314,6 +5310,12 @@ LayoutViewBase::paste_interactive ()
|
|||
|
||||
void
|
||||
LayoutViewBase::copy ()
|
||||
{
|
||||
copy_view_objects ();
|
||||
}
|
||||
|
||||
void
|
||||
LayoutViewBase::copy_view_objects ()
|
||||
{
|
||||
cancel_edits ();
|
||||
if (! lay::Editables::has_selection ()) {
|
||||
|
|
|
|||
|
|
@ -264,6 +264,13 @@ public:
|
|||
*/
|
||||
virtual void copy ();
|
||||
|
||||
/**
|
||||
* @brief Copies to clipboard (view objects only)
|
||||
*
|
||||
* This version does not look for copy sources in the tree views.
|
||||
*/
|
||||
void copy_view_objects ();
|
||||
|
||||
/**
|
||||
* @brief Cuts to clipboard
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1177,7 +1177,7 @@ LayoutViewFunctions::do_cm_duplicate (bool interactive)
|
|||
db::Clipboard::instance ().swap (saved_clipboard);
|
||||
|
||||
try {
|
||||
view ()->copy ();
|
||||
view ()->copy_view_objects ();
|
||||
view ()->clear_selection ();
|
||||
view ()->cancel ();
|
||||
if (interactive) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue