Browse Source

populate之前,移除控件本身的listener

master
Fangjie Hu 8 years ago
parent
commit
50f28fc95e
  1. 4
      designer_base/src/com/fr/design/gui/icombobox/UIComboBox.java
  2. 6
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

4
designer_base/src/com/fr/design/gui/icombobox/UIComboBox.java

@ -160,6 +160,10 @@ public class UIComboBox extends JComboBox implements UIObserver, GlobalNameObser
uiObserverListener = listener; uiObserverListener = listener;
} }
public void removeChangeListener(){
uiObserverListener = null;
}
/** /**
* @return * @return
*/ */

6
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -71,6 +71,7 @@ public class ChartTextAttrPane extends BasicPane {
} }
public void populate(FRFont frFont) { public void populate(FRFont frFont) {
removeAllComboBoxListener();
if (frFont == null) { if (frFont == null) {
return; return;
} }
@ -85,6 +86,11 @@ public class ChartTextAttrPane extends BasicPane {
} }
} }
private void removeAllComboBoxListener() {
fontNameComboBox.removeChangeListener();
fontSizeComboBox.removeChangeListener();
}
/** /**
* 更新字 * 更新字
* @return 更新字 * @return 更新字

Loading…
Cancel
Save