浏览代码

Fix ctkCmdLineModuleFrontend::parameters search by checking for zero output on compare function

MattClarkson 12 年之前
父节点
当前提交
a231e0f037
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      Libs/CommandLineModules/Core/ctkCmdLineModuleFrontend.cpp

+ 4 - 4
Libs/CommandLineModules/Core/ctkCmdLineModuleFrontend.cpp

@@ -139,16 +139,16 @@ QList<ctkCmdLineModuleParameter> ctkCmdLineModuleFrontend::parameters(const QStr
     foreach(ctkCmdLineModuleParameter param, group.parameters())
     {
       if (filters.testFlag(Input) &&
-          (param.channel().isEmpty() || param.channel().compare("input", Qt::CaseInsensitive)))
+          (param.channel().isEmpty() || param.channel().compare("input", Qt::CaseInsensitive) == 0))
       {
-        if (type.isEmpty() || param.tag().compare(type, Qt::CaseInsensitive))
+        if (type.isEmpty() || param.tag().compare(type, Qt::CaseInsensitive) == 0)
         {
           parameters << param;
         }
       }
-      if (filters.testFlag(Output) && param.channel().compare("output", Qt::CaseInsensitive))
+      if (filters.testFlag(Output) && param.channel().compare("output", Qt::CaseInsensitive) == 0)
       {
-        if (type.isEmpty() || param.tag().compare(type, Qt::CaseInsensitive))
+        if (type.isEmpty() || param.tag().compare(type, Qt::CaseInsensitive) == 0)
         {
           parameters << param;
         }