+ split file extension from descriptive text of file format to avoid that invalid translation breaks file dialog

This commit is contained in:
wmayer
2015-10-06 18:45:06 +02:00
parent d19ada810f
commit b374fcb6ef
8 changed files with 53 additions and 50 deletions

View File

@@ -42,8 +42,8 @@ using namespace PartGui;
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
DlgPartImportIgesImp::DlgPartImportIgesImp( QWidget* parent, Qt::WFlags fl )
: QDialog( parent, fl )
DlgPartImportIgesImp::DlgPartImportIgesImp(QWidget* parent, Qt::WFlags fl)
: QDialog(parent, fl)
{
this->setupUi(this);
}
@@ -66,9 +66,11 @@ void DlgPartImportIgesImp::OnApply()
void DlgPartImportIgesImp::onChooseFileName()
{
QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), QString::null, QString::null, tr("IGES (*.igs *.iges);;All Files (*.*)"));
if (! fn.isEmpty() )
{
QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), QString::null, QString::null,
QString::fromLatin1("%1 (*.igs *.iges);;%2 (*.*)"))
.arg(tr("IGES"))
.arg(tr("All Files"));
if (!fn.isEmpty()) {
FileName->setText(fn);
}
}