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 103231 - Ctrl-enter adds elements from previous selected element and palette
Summary: Ctrl-enter adds elements from previous selected element and palette
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: General Diagram (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Thuy.d Nguyen
URL:
Keywords: A11Y, REGRESSION
Depends on:
Blocks:
 
Reported: 2007-05-03 13:01 UTC by Sergey Petrov
Modified: 2007-06-20 14:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Petrov 2007-05-03 13:01:49 UTC
Ctrl-enter adds elements from tree and palette at the same time
reproducible with m9-070502
not reproducible with 551

steps:
1. create uml project
2. add package with scoped class diagram (type doesn't matter)
3. select package node in project tree (click mouse)
4. select class in palette (click mouse)
5. press ctrl-enter
package from project tree and class from palette are added to the diagram
Comment 1 Sergey Petrov 2007-05-03 13:29:02 UTC
similar result if step3 change to select some element on the diagram
after step 5 copy of element from step 3 will be added and new element from
palette will be added too
Comment 2 Thuy.d Nguyen 2007-05-23 19:20:58 UTC
I've fixed this issue as follows:
If there are model nodes (elements) being selected on both the project tree and
the palette components,  Ctrl-Enter only applies to the node of the activated
components; hence only the selected node on either project tree or palette is
added to the diagram at a time.

The scenario mention by sergeyp is also fixed.  That is... Ctrl-Enter now does
not duplicate a selected element on the diagram. 
Comment 3 Andrew Korostelev 2007-05-25 10:40:11 UTC
still reproducible in netbeans-6.0-nightly-200705250000-full.

Now if user had element selected on diagram and adds element from tree,
The first Ctrl+Enter adds element from tree (as expected),
but the following Ctrl+Enter will start adding copies of element that was
selected on diagram before.

steps:
- create class diagram
- add two elements to diagram: e.g. classes E1 and E2
- find E2 in project tree
- click on  E1 on diagram to select it
- click on E2 node in project tree
invoke Ctrl+Enter - E2 will be added to diagram
invoke Ctrl+Enter again several times - E1 is now added 
Comment 4 Thuy.d Nguyen 2007-06-19 22:13:06 UTC
Called fireSelectEvent afterward to reset the activated nodes on the diagram top component. Fixed and integrated in trunk.
Comment 5 Andrew Korostelev 2007-06-20 14:38:19 UTC
verified in netbeans-hudson-trunk-980-full (Build 070620)