Browse Source

REPORT-33162 监听插件改动面板刷新线程安全

feature/big-screen
yaohwu 5 years ago
parent
commit
7fd2900d3e
  1. 8
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellExpandExtraAttrPane.java

8
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellExpandExtraAttrPane.java

@ -5,6 +5,7 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.CellExpandAttrPanelProvider; import com.fr.design.fun.CellExpandAttrPanelProvider;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.ui.util.UIUtil;
import com.fr.event.EventDispatcher; import com.fr.event.EventDispatcher;
import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.injectable.PluginModule;
@ -52,7 +53,12 @@ public class CellExpandExtraAttrPane extends JPanel {
PluginEventListener listener = new PluginEventListener() { PluginEventListener listener = new PluginEventListener() {
@Override @Override
public void on(PluginEvent event) { public void on(PluginEvent event) {
CellExpandExtraAttrPane.getInstance().refresh(); UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
CellExpandExtraAttrPane.getInstance().refresh();
}
});
} }
}; };
EventDispatcher.listen(AfterRun, listener, filter); EventDispatcher.listen(AfterRun, listener, filter);

Loading…
Cancel
Save