This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 63719 - Copy-paste should preserve layout of the pasted group of components
Summary: Copy-paste should preserve layout of the pasted group of components
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 5.x
Hardware: PC All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 72323 81471 (view as bug list)
Depends on:
Blocks: 89585
  Show dependency tree
 
Reported: 2005-09-06 15:43 UTC by Antonin Nebuzelsky
Modified: 2007-08-10 15:43 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonin Nebuzelsky 2005-09-06 15:43:38 UTC
When you select several components, do Edit/Copy and then Edit/Paste, you expect
that the components will be pasted with the same layout. Instead, they are all
pasted to the leftmost upper corner of the container, without any allignment
between them.
Comment 1 Antonin Nebuzelsky 2005-09-06 15:55:36 UTC
Also, it would be ideal if the components could be pasted to the place where the
user currently has the mouse cursor. (Preserving their layout.) And also making
their relationship to already existing components in the container. This would
extremely speedup creation of large forms with repeating groups of items.
Comment 2 Jan Stola 2005-09-16 10:51:49 UTC
The first part of the report describes behaviour that is not ideal,
but is as designed. When the component is copied into Free Design
it obtains a temporary position in the top left corner (in an independent
group/layer) and should be re-positioned by the user.
When the user pastes more components then they are (unfortuntately)
placed one over another. I agree that this doesn't look very nice,
but it even more emphasize that the location is temporary and should be changed.
We don't keep relative positions of components while pasting because that would
make the user think that the location can be left as it is - which
would be incorrect because the components are in an independent group/layer
(which could result in unexpected overlaps of components).

The second part is a request for enahncement. We will try to reconsider
also the first part when we will evaluate the second part for the next release.
Comment 3 Tomas Pavek 2006-01-05 18:28:21 UTC
We could also consider a special "duplicate" action - which would at one shot
create a copy of selected component and place it nearby. Would work also for
multiple components. The problematic part is how to define "nearby". This action
could also be invoked by Ctrl+C and Ctrl+V pressed on the component (i.e. when
trying to paste component to itself).
Comment 4 Tomas Pavek 2006-01-06 15:02:24 UTC
See also issue 15719.
Comment 5 tprochazka 2006-07-25 08:00:18 UTC
It would be also productive, if Netbeans support drag&drop with copy. I select 
several components, move them, push ctrl key (cursor change to +) and when I release 
mouse button, Netbeans create copy of componet to new position. This is standard in 
graphics editors as Corel Draw.
Comment 6 Tomas Pavek 2006-08-04 11:29:27 UTC
*** Issue 81471 has been marked as a duplicate of this issue. ***
Comment 7 Tomas Pavek 2007-04-19 14:22:31 UTC
Done. Copying now preserves the layout - pasted components are placed over the
existing to be placed correctly by the user afterwards. Copying all components
from one container to another (empty) does an exact 1:1 copy of the layout.

Duplicating has been implemented as well - in a simple way (selected components
are copied below (on a new "row"), preserving alignment in columns).

Ctrl+drag copying has not been done. We'll create a separate issue if it's
appears to be useful or important.
Comment 8 Tomas Pavek 2007-08-10 15:43:55 UTC
*** Issue 72323 has been marked as a duplicate of this issue. ***