Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 262239

Summary: logic diagram example: LED doesn't reset to zero when wires disconected
Product: [Tools] GEF Reporter: Brendan Curran-Johnson <brendanc>
Component: GEF-Legacy GEF (MVC)Assignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: ahunter.eclipse, nyssen
Version: 3.4   
Target Milestone: 3.10.0 (Mars) M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Delete the connection, but the LED value is not changed. none

Description Brendan Curran-Johnson CLA 2009-01-23 16:26:23 EST
Build ID: I20081211-1908

Steps To Reproduce:
1.open up the logic diagram example
2.create a V+ and an LED
3.connect the V+ to an input of the LED
4.remove the connection
The LED will still display the input value


More information:
If there are multiple connections, and they are terminated at the same time, the output will display the value of the last of those connections that the system deletes. The only way to reset to zero is by attaching a ground.
Comment 1 Evelynkuo CLA 2009-04-15 06:41:21 EDT
Created attachment 131911 [details]
Delete the connection, but the LED value is not changed.

This bug also occurs in Build: I20090411-1031
Platform: Windows Vista, Windows XP
Affected Locale(s): Korean, SChinese, TChinese, Turkish(pls see TR_1.gif)
Comment 2 Alexander Nyßen CLA 2011-09-11 17:52:58 EDT
Fixed implementation of LED#update(), which did not reset the bit values in case there is no connection present.
Comment 3 Alexander Nyßen CLA 2011-09-11 18:01:05 EDT
Changed committed to cvs HEAD as well as R3_7_maintenance branch. Also updated org.eclipse.gef.examples.ui.pde zip files in both branches.
Comment 4 Alexander Nyßen CLA 2014-08-19 15:04:22 EDT
It seems the implemented fix broke the increment/decrement functionality.
Comment 5 Alexander Nyßen CLA 2014-08-20 01:53:40 EDT
As the LED is somehow a mixture of Hex-Switch and Hex-Display, I think a consistent behavior could be as follows:

- if no input is present, show the local value, and allow it to be increase/decreased.
- if input is present, use that input, ignore any increase/decrease. 

This way, upon disconnect, it will use the value that has been set (via increase/decrease) before being connected.
Comment 6 Alexander Nyßen CLA 2014-08-20 02:44:54 EDT
Implemented the more consistent behavior outlined before. Changes pushed to origin/master. Resolving as fixed in 3.10.0M2.