Disable OBJ export item if no components selected

This commit is contained in:
SiboVG 2023-08-18 04:16:40 +02:00
parent 2e636f5205
commit cb41a0ae85

View File

@ -448,6 +448,12 @@ public class BasicFrame extends JFrame {
public void actionPerformed(ActionEvent e) {
exportWavefrontOBJAction();}
});
selectionModel.addDocumentSelectionListener(new DocumentSelectionListener() {
@Override
public void valueChanged(int changeType) {
exportOBJ.setEnabled(getSelectedComponents() != null && !getSelectedComponents().isEmpty());
}
});
exportSubMenu.add(exportOBJ);
fileMenu.add(exportSubMenu);