浏览代码

Add asterisk when generating nameFilters

Matt Clarkson 10 年之前
父节点
当前提交
24a27cd8a5
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Libs/CommandLineModules/Frontend/QtGui/Resources/ctkCmdLineModuleXmlToQtUi.xsl

+ 2 - 1
Libs/CommandLineModules/Frontend/QtGui/Resources/ctkCmdLineModuleXmlToQtUi.xsl

@@ -246,7 +246,8 @@
     <property name="nameFilters">
     <property name="nameFilters">
       <stringlist>
       <stringlist>
       <xsl:for-each select="tokenize(@fileExtensions, ',')">
       <xsl:for-each select="tokenize(@fileExtensions, ',')">
-        <string><xsl:value-of select="normalize-space(.)"/></string>
+        <!-- Note: We add an asterisk at the start. If the asterisk is missing in the xml, you can't select anything. But if you end up with multiple asterisks, you can still select files. -->
+        <string>*<xsl:value-of select="normalize-space(.)"/></string>
       </xsl:for-each>
       </xsl:for-each>
       </stringlist>
       </stringlist>
     </property>
     </property>