Browse Source

Merge pull request #215 in BA/design from ~NEIL/design:dev to dev

* commit '0555774776602906ca7a2034ade35173abd8c50f':
  有自定义按钮后, web属性工具栏设置保存不上.
master
superman 9 years ago
parent
commit
9164fdc9b4
  1. 10
      designer/src/com/fr/design/webattr/EditToolBar.java

10
designer/src/com/fr/design/webattr/EditToolBar.java

@ -63,16 +63,8 @@ public class EditToolBar extends BasicPane {
private ListSelectionListener listSelectionListener = new ListSelectionListener() { private ListSelectionListener listSelectionListener = new ListSelectionListener() {
public void valueChanged(ListSelectionEvent evt) { public void valueChanged(ListSelectionEvent evt) {
if (lastButton != null && lastButton.getWidget() instanceof Button) { if (lastButton != null) {
if (!((list.getSelectedValue() instanceof ToolBarButton)
&& ((ToolBarButton)(list.getSelectedValue())).getWidget() instanceof CustomToolBarButton)) {
lastButton.setWidget(bp.update()); lastButton.setWidget(bp.update());
} else {
((Button) lastButton.getWidget()).setShowIcon(bp.icon.isSelected());
((Button) lastButton.getWidget()).setShowText(bp.text.isSelected());
((Button) lastButton.getWidget()).setText(bp.nameField.getText());
((Button) lastButton.getWidget()).setIconName(bp.iconPane.update());
}
} }
if (list.getSelectedValue() instanceof ToolBarButton) { if (list.getSelectedValue() instanceof ToolBarButton) {
lastButton = (ToolBarButton) list.getSelectedValue(); lastButton = (ToolBarButton) list.getSelectedValue();

Loading…
Cancel
Save