Skip to content

Commit

Permalink
MML入力(上書き)時に, TrackViewのパート情報更新ができていない問題を修正.
Browse files Browse the repository at this point in the history
  • Loading branch information
fourthline committed Dec 27, 2014
1 parent 80808cb commit 9e9fae0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
8 changes: 2 additions & 6 deletions src/fourthline/mabiicco/MabiIcco.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,13 @@ public void start(Stage stage) throws Exception {

public void initialize() {
try {
UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );

// font
String fontName = AppResource.appText("ui.font");
if (!fontName.equals("ui.font")) {
setUIFont(new javax.swing.plaf.FontUIResource(fontName, Font.PLAIN, 11));
}
UIManager.LookAndFeelInfo infos[] = UIManager.getInstalledLookAndFeels();
for (UIManager.LookAndFeelInfo info : infos) {
System.out.println(info.getClassName());
}

UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );

// initialize
MabiDLS.getInstance().initializeMIDI();
Expand Down
18 changes: 2 additions & 16 deletions src/fourthline/mabiicco/ui/MMLTrackView.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;

import fourthline.mabiicco.AppResource;
import fourthline.mabiicco.midi.InstClass;
Expand All @@ -35,7 +33,7 @@
import java.util.EnumSet;
import java.util.HashMap;

public final class MMLTrackView extends JPanel implements ActionListener, DocumentListener {
public final class MMLTrackView extends JPanel implements ActionListener {

private static final long serialVersionUID = 4955513242349170508L;
public static final String MMLPART_NAME[] = {
Expand Down Expand Up @@ -131,7 +129,6 @@ private MMLTrackView() {
mmlText[i] = new JTextField();
mmlText[i].setEditable(false);
mmlText[i].setFont(new Font("Monospaced", Font.PLAIN, 12));
mmlText[i].getDocument().addDocumentListener(this);
mmlText[i].setColumns(10);

GridBagConstraints gbc_mmlText = new GridBagConstraints();
Expand Down Expand Up @@ -229,17 +226,6 @@ public void setSelectMMLPartOfIndex(int index) {
partButton[index].setSelected(true);
}

@Override
public void removeUpdate(DocumentEvent event) {
}
@Override
public void insertUpdate(DocumentEvent event) {
}

@Override
public void changedUpdate(DocumentEvent event) {
}

public void updateTrack() {
MMLTrack mmlTrack = mmlManager.getMMLScore().getTrack(trackIndex);
String mml[] = mmlTrack.getMabiMMLArray();
Expand Down Expand Up @@ -294,6 +280,7 @@ private void updateProgramChangeStatus() {
} else {
songComboBox.setVisible(true);
}
updatePartButtonStatus();

InstClass songInst = ((InstClass) songComboBox.getSelectedItem());
int program = inst.getProgram();
Expand All @@ -303,7 +290,6 @@ private void updateProgramChangeStatus() {
return;
}

updatePartButtonStatus();
mmlManager.updateActiveTrackProgram(trackIndex, program, songProgram);
}

Expand Down

0 comments on commit 9e9fae0

Please sign in to comment.