Skip to content

Commit 7ccea02

Browse files
committed
Fix bug in volume recognition code
1 parent 314a837 commit 7ccea02

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

core/src/mdichild.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2851,9 +2851,11 @@ iALogger * MdiChild::getLogger()
28512851

28522852
bool MdiChild::IsVolumeDataLoaded() const
28532853
{
2854-
return QString::compare(getFileInfo().suffix(), "STL", Qt::CaseInsensitive) == 0 &&
2855-
QString::compare(getFileInfo().suffix(), "FEM", Qt::CaseInsensitive) == 0 &&
2856-
imageData->GetExtent()[1] >= 0 && imageData->GetExtent()[3] >= 0 && imageData->GetExtent()[5] >= 0;
2854+
QString suffix = getFileInfo().suffix();
2855+
int * extent = imageData->GetExtent();
2856+
return QString::compare(suffix, "STL", Qt::CaseInsensitive) != 0 &&
2857+
QString::compare(suffix, "FEM", Qt::CaseInsensitive) != 0 &&
2858+
extent[1] >= 0 && extent[3] >= 0 && extent[5] >= 0;
28572859
}
28582860

28592861

0 commit comments

Comments
 (0)