File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
src/org/openlowcode/client/graphic/widget Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ public class CMenu {
3636 private String label ;
3737 private ArrayList <CMenuItem > listofitems ;
3838 private String icon ;
39- private static HashMap <String ,ImageView > imagesperpath = new HashMap <String ,ImageView >();
4039
4140 /**
4241 * create a menu from a message from the server
@@ -71,16 +70,15 @@ public CMenu(MessageReader reader, CPageSignifPath parentpath) throws OLcRemoteE
7170 */
7271 public Menu getMenu (PageActionManager actionmanager , CPageData inputdata , Window parentwindow ) {
7372 Menu menu = new Menu (label );
74- if (icon !=null ) if (icon .length ()>0 ) {
75- ImageView image = imagesperpath .get (icon );
76- if (image ==null ) {
77- image = new ImageView (new Image (icon ));
73+ if (icon != null )
74+ if (icon .length () > 0 ) {
75+ ImageView image = new ImageView (new Image (icon ));
7876 image .setFitHeight (16 );
7977 image .setFitWidth (16 );
80- imagesperpath .put (icon , image );
78+
79+ if (image != null )
80+ menu .setGraphic (image );
8181 }
82- if (image !=null ) menu .setGraphic (image );
83- }
8482 for (int i = 0 ; i < listofitems .size (); i ++) {
8583 menu .getItems ().add (listofitems .get (i ).getMenuItem (actionmanager , inputdata , parentwindow ));
8684 }
You can’t perform that action at this time.
0 commit comments