Pictogram 1.6, beta 8, issue #454 closed

parent a477d380
...@@ -122,11 +122,14 @@ public class Vocabulary implements Iterable<Picto> { ...@@ -122,11 +122,14 @@ public class Vocabulary implements Iterable<Picto> {
Enumeration<LinkedList<Picto>> scenes=this.pictos.elements(); Enumeration<LinkedList<Picto>> scenes=this.pictos.elements();
while (scenes.hasMoreElements()) { while (scenes.hasMoreElements()) {
LinkedList<Picto> scene=scenes.nextElement(); LinkedList<Picto> scene=scenes.nextElement();
for (Picto picto:scene) for (Picto picto:scene) {
picto.set_legend(legend); picto.set_legend(legend);
PCBcontext.getPcbdb().modifyPicto(picto.get_grid(), picto.get_ImgId(), picto.get_json_attrs());
} }
} }
}
public void addActionTalkListener(ActionTalk.iActionListener listener) { public void addActionTalkListener(ActionTalk.iActionListener listener) {
if (actionTalk==null) actionTalk=new ActionTalk(PCBcontext.getRoom(), listener); if (actionTalk==null) actionTalk=new ActionTalk(PCBcontext.getRoom(), listener);
else actionTalk.addListener(listener); else actionTalk.addListener(listener);
...@@ -244,10 +247,7 @@ public class Vocabulary implements Iterable<Picto> { ...@@ -244,10 +247,7 @@ public class Vocabulary implements Iterable<Picto> {
int index=find_picto_index(pic_grid,pic_id); int index=find_picto_index(pic_grid,pic_id);
if (index>=0) { //puede ocurrir que se intente modificar un pictograma que fue borrado if (index>=0) { //puede ocurrir que se intente modificar un pictograma que fue borrado
Picto picto = this.pictos.get(pic_grid).get(index); Picto picto = this.pictos.get(pic_grid).get(index);
String old_legend=picto.get_legend();
picto.set_json_attr(attrs); picto.set_json_attr(attrs);
// if (!old_legend.equals(picto.get_legend())) //puede ocurrir que se cambie la leyenda de TODOS los pictos
// this.synchronize();
PCBcontext.getPcbdb().modifyPicto(pic_grid, pic_id, attrs.toString()); PCBcontext.getPcbdb().modifyPicto(pic_grid, pic_id, attrs.toString());
if (picto.get_child_grid()!=id_child_grid) if (picto.get_child_grid()!=id_child_grid)
PCBcontext.getNetService().restart_app(false); PCBcontext.getNetService().restart_app(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment