Disable OBJ export item if no components selected
This commit is contained in:
parent
2e636f5205
commit
cb41a0ae85
@ -448,6 +448,12 @@ public class BasicFrame extends JFrame {
|
|||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
exportWavefrontOBJAction();}
|
exportWavefrontOBJAction();}
|
||||||
});
|
});
|
||||||
|
selectionModel.addDocumentSelectionListener(new DocumentSelectionListener() {
|
||||||
|
@Override
|
||||||
|
public void valueChanged(int changeType) {
|
||||||
|
exportOBJ.setEnabled(getSelectedComponents() != null && !getSelectedComponents().isEmpty());
|
||||||
|
}
|
||||||
|
});
|
||||||
exportSubMenu.add(exportOBJ);
|
exportSubMenu.add(exportOBJ);
|
||||||
|
|
||||||
fileMenu.add(exportSubMenu);
|
fileMenu.add(exportSubMenu);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user