Browse Source

REPORT-101480 【版本管理二期】自动保存后手动保存,版本管理逻辑会乱

new-design
Destiny.Lin 1 year ago
parent
commit
a1c7143c46
  1. 6
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

6
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -114,6 +114,8 @@ import java.awt.Dimension;
import java.awt.FontMetrics;
import java.io.ByteArrayOutputStream;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Callable;
@ -1146,6 +1148,10 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
* @param l 模板Listener
*/
public void addJTemplateActionListener(JTemplateActionListener l) {
List<Object> list = Arrays.asList(this.listenerList.getListeners(JTemplateActionListener.class));
if (list.contains(l)) {
this.listenerList.remove(JTemplateActionListener.class, l);
}
this.listenerList.add(JTemplateActionListener.class, l);
}

Loading…
Cancel
Save