[Kst] [Bug 123399] error reading certain fits files

Andrew Walker arwalker at sumusltd.com
Tue Mar 14 20:28:10 CET 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=123399         
arwalker sumusltd com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From arwalker sumusltd com  2006-03-14 20:28 -------
SVN commit 518642 by arwalker:

BUG:123399 Allow for the posibility that column labels are identical.

 M  +12 -3     lfiio.cpp  


--- trunk/extragear/graphics/kst/src/datasources/lfiio/lfiio.cpp #518641:518642
 @ -117,19 +117,28  @
           for( i=0; i<iNumCols; i++ )
           {
             iStatus = 0;
-
+      
             sprintf( charTemplate, "%d", i+1 );
             iResult = fits_get_colname( ffits, CASEINSEN, charTemplate, charName, &iColNumber, &iStatus );
             if( iResult == 0 )
             {
+              int iOffset = i;
+              
               strName = charName;
-              _fieldList.append( strName );
+              //
+              // ensure that we don't add duplicates to the _fieldList...
+              //
+              while( _fieldList.findIndex( strName ) != -1 )
+              {
+                strName = QString("%1[%2]").arg( charName ). arg( iOffset );
+                iOffset++;
+              }
             }
             else
             {
               strName.setNum( i );
-              _fieldList.append( strName );
             }
+            _fieldList.append( strName );
 
             iStatus = 0;
             iResult = fits_get_coltype( ffits, i+1, &iTypeCode, &lRepeat, &lWidth, &iStatus );


More information about the Kst mailing list