This commit is contained in:
nisihara1 2017-08-30 00:15:57 +09:00
parent ba4c13f489
commit a3b18e0c38
2 changed files with 18 additions and 4 deletions

View File

@ -29,7 +29,8 @@ public class QEFXDosButton extends QEFXGraphButton<QEFXDosViewer> {
private static final String BUTTON_FONT_COLOR = "-fx-text-fill: ivory";
private static final String BUTTON_BACKGROUND = "-fx-background-color: derive(lightslategrey, -45.0%)";
public static QEFXResultButtonWrapper<QEFXDosButton> getWrapper(QEFXProjectController projectController, Project project) {
public static QEFXResultButtonWrapper<QEFXDosButton> getWrapper(QEFXProjectController projectController,
Project project) {
if (projectController == null) {
return null;
}
@ -50,12 +51,14 @@ public class QEFXDosButton extends QEFXGraphButton<QEFXDosViewer> {
}
List<DosData> dosDataList = projectDos.listDosData();
if (dosDataList == null || dosDataList.size() < 2) {
//if (dosDataList == null || dosDataList.size() < 2) {
if (dosDataList == null || dosDataList.size() < 1) {
return null;
}
String dirPath = project == null ? null : project.getDirectoryPath();
String fileName = project == null ? null : (project.getPrefixName() + ".pdos_tot");
//String fileName = project == null ? null : (project.getPrefixName() + ".pdos_tot");
String fileName = project == null ? null : (project.getPrefixName() + ".dos");
File file = null;
if (dirPath != null && fileName != null) {

View File

@ -374,7 +374,18 @@ public enum RunningType {
conditionList.add((project, input) -> true);
conditionList.add((project, input) -> true);
conditionList.add((project, input) -> true);
conditionList.add((project, input) -> {
QENamelist nmlSystem = input == null ? null : input.getNamelist(QEInput.NAMELIST_SYSTEM);
if (nmlSystem == null) {
return false;
}
QEValue value = nmlSystem.getValue("occupations");
String occup = value == null ? "" : value.getCharacterValue();
return !(occup.startsWith("tetrahedra"));
});
break;
case Project.INPUT_MODE_BAND: