Bug #6834
closedkepler data can icon displayed incorrectly
Description
The "data can" icon used by DataTurbine and several other Kepler actors is displayed incorrectly. This appears to have been started with Ptolemy r73168 (r73163-73167 do not compile).
Files
Updated by Christopher Brooks over 9 years ago
- File DataTurbineIconIncorrect_2015-09-09.png DataTurbineIconIncorrect_2015-09-09.png added
- File DataTurbineIconCorrect_2015-08-17.png DataTurbineIconCorrect_2015-08-17.png added
- File DataTurbineIncorrect_r71368.png DataTurbineIncorrect_r71368.png added
- Assignee changed from Daniel Crawl to Christopher Brooks
To replicate this, build Kepler:
mkdir kepler.modules
cd kepler.modules
svn co https://code.kepler-project.org/code/kepler/trunk/modules/build-area
cd build-area
ant change-to -Dsuite=kepler
ant run
Then search for DataTurbine and drag the actor in. The icon is incorrect, the top and bottom are offset.
The problem does not occur in ptII r73162. To replicate:
cd ../ptolemy/src
svn update -r 73162
cd ../../gui/src
svn update -r '{2015-08-17}'
cd ../../build
ant clean
ant
Then search for the DataTurbine icon and drag it in. The top and bottom are correct.
If I update to r73168, the the bottom of the cylinder is offset incorrectly. The error is different than what is at the head.
cd ../ptolemy/src
svn update -r 73168
cd ../../build-run
ant clean
ant run
Below are the changes betwee 73162 and 73168
2015-08-17 20:03 cxh
- [r73168] /trunk/ptolemy/vergil/icon/ShapeIcon.java: Summary:
setRotation() angle arg must be final to avoid Java 1.7: "error:
local variable angle is accessed from within inner class; needs
to be declared final".
2015-08-17 18:28 eal
- [r73167] /trunk/lib/diva.jar: Updated jar with fix to prevent
double application of rotation
2015-08-17 18:13 eal
- [r73166]
/trunk/org/terraswarm/accessor/demo/MotionDetector/MotionDetector.xml:
Demo tuning
2015-08-17 18:13 eal
- [r73165] /trunk/diva/canvas/toolbox/BasicFigure.java,
/trunk/ptolemy/vergil/icon/ShapeIcon.java: Fixed double
application of rotation
2015-08-17 14:59 cxh
- [r73164] /trunk/lib/diva.jar: Update diva.jar after r73163:
Support rotation of basic figures.
2015-08-17 12:56 eal
- [r73163] /trunk/diva/canvas/toolbox/BasicFigure.java,
/trunk/ptolemy/vergil/icon/ShapeIcon.java,
/trunk/ptolemy/vergil/kernel/attributes/ShapeAttribute.java:
Support rotation of basic figures.
2015-08-17 12:56 eal
- [r73162] /trunk/ptolemy/actor/lib/jjs/JavaScript.java: Fixed bug
where had been assuming StringParameter, but are now using string
mode in an ordinary Parameter
Updated by Christopher Brooks over 9 years ago
- % Done changed from 0 to 40
Edward had a look and wrote:
Ok, I finally got it so I could replicate this.
I've cc'd Daniel Crawl, because I'm not sure how many icons need to be fixed.
In DataSourceIcon.java, there are two lines that are incorrect:
_bottomEllipse.centered.setToken("false");
and
_topEllipse.centered.setToken("false");
These were resulting in a correct icon because of a bug in diva, which I have fixed.
So now the icons are incorrect. But the above code is incorrect.
If you look at the way the icon is constructed, the above lines should be:
_bottomEllipse.centered.setToken("true");
and
_topEllipse.centered.setToken("true");
which now results in a correct icon.
I'm amazed that the bug in diva went unnoticed for so long...
Updated by Daniel Crawl over 9 years ago
- Status changed from New to Resolved
- % Done changed from 40 to 100
Thanks, Edward. I updated DataSourceIcon.java and didn't find any other icons with this problem.