OSDN Git Service

REF AIR display bug
authorENDO Michiaki <dinosaur@db3.so-net.ne.jp>
Thu, 5 Mar 2015 06:54:57 +0000 (15:54 +0900)
committerENDO Michiaki <dinosaur@db3.so-net.ne.jp>
Thu, 5 Mar 2015 06:54:57 +0000 (15:54 +0900)
KODS_GUI.pro.user
mainwindow.cpp

index 5c92922..c6ad331 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 3.1.2, 2015-03-05T14:11:35. -->
+<!-- Written by QtCreator 3.1.2, 2015-03-05T15:54:02. -->
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
index e0ecccc..35e80ed 100644 (file)
@@ -1071,51 +1071,52 @@ void MainWindow::ReadFileToTable(QString pathname)
             return;
         }
 
+        if (material.left(3)=="AIR"){
+            table->setItem(k,2,new QTableWidgetItem("AIR"));
+            k++;
+            continue;
+        }
+
         if (material.left(5)=="NODUM"){
-        material = lines[i+2].trimmed();
+            material = lines[i+2].trimmed();
+            continue;
         }
 
         if (material.left(5)=="IDEAL"){
             table->setItem(k,2,new QTableWidgetItem("IDEAL"));
+            table->setItem(k,3,new QTableWidgetItem("1"));
+            table->setItem(k,4,new QTableWidgetItem("0"));
             k++;
-        }
-
-        if (material.left(3)=="AIR"){
-            table->setItem(k,2,new QTableWidgetItem("AIR"));
-            k++;
+            continue;
         }
 
 
         if (material.left(4)=="REFS"){
 
+                table->setItem(k,2,new QTableWidgetItem("REFS "+lines[i+2].trimmed()));
+                k++;
+                i=i+2;
+
             if((lines[i+2].trimmed()=="ASTOP")*(lines[i+3].trimmed()=="REFL")){
                 table->setItem(k,2,new QTableWidgetItem("REFS STOP REFL"));
-                k++;
                 i=i+3;
             }
 
             if(lines[i+2].trimmed()=="ASTOP"){
                 table->setItem(k,2,new QTableWidgetItem("REFS STOP"));
-                k++;
                 i=i+2;
             }
             if(lines[i+2].trimmed()=="REFL"){
                 table->setItem(k,2,new QTableWidgetItem("REFS REFL"));
-                k++;
                 i=i+2;
             }
-
-            else
-                table->setItem(k,2,new QTableWidgetItem("REFS"));
-                k++;
-                i=i+1;
-
+        continue;
         }
 
-
         if (material.left(4)=="REFL"){
             table->setItem(k,2,new QTableWidgetItem("REFL"));
             k++;
+            continue;
         }
 
 
@@ -1124,6 +1125,7 @@ void MainWindow::ReadFileToTable(QString pathname)
             table->setItem(k,3,new QTableWidgetItem("1.00000"));
             table->setItem(k,4,new QTableWidgetItem("0.00000"));
             k++;
+            continue;
         }
 
         if (material.left(5)=="MODEL"){
@@ -1134,6 +1136,7 @@ void MainWindow::ReadFileToTable(QString pathname)
             table->setItem(k,4,new QTableWidgetItem(Abbe.setNum(Abbe.toDouble(),'g',6)));
             table->resizeColumnToContents(2);
             k++;
+            continue;
         }
 
         if (material.left(3)=="SCH"){