0020691: EDF SMESH : Export STL always in binary

This commit is contained in:
vsr 2010-02-08 11:22:48 +00:00
parent 8abff026bc
commit d06764f347

View File

@ -393,7 +393,7 @@
return; return;
} }
aFilterMapSTL.insert( QObject::tr("STL ASCII (*.stl)"), 1 ); // 1 - ASCII mode aFilterMapSTL.insert( QObject::tr("STL ASCII (*.stl)"), 1 ); // 1 - ASCII mode
aFilterMapSTL.insert( QObject::tr("STL Binary (*.stl)"), 0 ); // 0 - Binary mode aFilterMapSTL.insert( QObject::tr("STL Binary (*.stl)"), 0 ); // 0 - Binary mode
} }
break; break;
@ -428,8 +428,8 @@
SUIT_FileDlg* fd = new SUIT_FileDlg( SMESHGUI::desktop(), false, true, true ); SUIT_FileDlg* fd = new SUIT_FileDlg( SMESHGUI::desktop(), false, true, true );
fd->setWindowTitle( aTitle ); fd->setWindowTitle( aTitle );
fd->setFilters( filters ); fd->setNameFilters( filters );
fd->selectFilter( QObject::tr("STL ASCII (*.stl)") ); fd->selectNameFilter( QObject::tr("STL ASCII (*.stl)") );
if ( !anInitialPath.isEmpty() ) if ( !anInitialPath.isEmpty() )
fd->setDirectory( anInitialPath ); fd->setDirectory( anInitialPath );
fd->selectFile(aMeshName); fd->selectFile(aMeshName);
@ -437,7 +437,7 @@
while (!is_ok) { while (!is_ok) {
if ( fd->exec() ) if ( fd->exec() )
aFilename = fd->selectedFile(); aFilename = fd->selectedFile();
aIsASCII_STL = (aFilterMapSTL[fd->selectedFilter()]) == 1 ? true: false; aIsASCII_STL = (aFilterMapSTL[fd->selectedNameFilter()]) == 1 ? true: false;
is_ok = true; is_ok = true;
} }
delete fd; delete fd;
@ -456,9 +456,9 @@
SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg
( SMESHGUI::desktop(), false, QObject::tr("SMESH_AUTO_GROUPS"), true, true ); ( SMESHGUI::desktop(), false, QObject::tr("SMESH_AUTO_GROUPS"), true, true );
fd->setWindowTitle( aTitle ); fd->setWindowTitle( aTitle );
fd->setFilters( filters ); fd->setNameFilters( filters );
//fd->setSelectedFilter( QObject::tr("MED 2.2 (*.med)") ); //fd->setSelectedNameFilter( QObject::tr("MED 2.2 (*.med)") );
fd->selectFilter(aDefaultFilter); fd->selectNameFilter(aDefaultFilter);
fd->SetChecked(toCreateGroups); fd->SetChecked(toCreateGroups);
if ( !anInitialPath.isEmpty() ) if ( !anInitialPath.isEmpty() )
fd->setDirectory( anInitialPath ); fd->setDirectory( anInitialPath );
@ -475,7 +475,7 @@
aFilename = QString::null; aFilename = QString::null;
break; break;
} }
aFormat = aFilterMap[fd->selectedFilter()]; aFormat = aFilterMap[fd->selectedNameFilter()];
toOverwrite = fv->isOverwrite(); toOverwrite = fv->isOverwrite();
is_ok = true; is_ok = true;
if ( !aFilename.isEmpty() ) { if ( !aFilename.isEmpty() ) {