]> Creatis software - clitk.git/commitdiff
Display 'NA' if memory usage is not available
authordsarrut <dsarrut>
Fri, 11 Mar 2011 07:14:56 +0000 (07:14 +0000)
committerdsarrut <dsarrut>
Fri, 11 Mar 2011 07:14:56 +0000 (07:14 +0000)
vv/vvMainWindow.cxx

index 141cd1836163fd8ca5144fdcc47c04f4e2d7a6aa..a2336e789062e7f36356fa150d7f83bae61dde54 100644 (file)
@@ -335,7 +335,8 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
 void vvMainWindow::UpdateMemoryUsage()
 {
   //  clitk::PrintMemory(true);
-  infoPanel->setMemoryInMb(QString::number(clitk::GetMemoryUsageInMb())+" MiB");
+  if (clitk::GetMemoryUsageInMb() == 0) infoPanel->setMemoryInMb("NA");
+  else infoPanel->setMemoryInMb(QString::number(clitk::GetMemoryUsageInMb())+" MiB");
 }
 //------------------------------------------------------------------------------