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

+ add method to make image view unclosable for user
+ fix possible crash in MeshAlgorithm::GetMeshBorder
+ fix possible crash in MeshAlgorithm::ConnectLines
This commit is contained in:
wmayer
2015-10-06 17:28:52 +02:00
parent 8284ecc8e8
commit d19ada810f
24 changed files with 278 additions and 253 deletions

View File

@@ -1197,7 +1197,7 @@ void PythonConsole::onSaveHistoryAs()
QString cMacroPath = QString::fromUtf8(getDefaultParameter()->GetGroup( "Macro" )->
GetASCII("MacroPath",App::Application::getUserAppDataDir().c_str()).c_str());
QString fn = FileDialog::getSaveFileName(this, tr("Save History"), cMacroPath,
tr("Macro Files (*.FCMacro *.py)"));
QString::fromLatin1("%1 (*.FCMacro *.py)").arg(tr("Macro Files")));
if (!fn.isEmpty()) {
int dot = fn.indexOf(QLatin1Char('.'));
if (dot != -1) {
@@ -1215,7 +1215,8 @@ void PythonConsole::onSaveHistoryAs()
void PythonConsole::onInsertFileName()
{
QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), tr("Insert file name"), QString::null, tr("All Files (*.*)") );
QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), tr("Insert file name"), QString::null,
QString::fromLatin1("%1 (*.*)").arg(tr("All Files")));
if ( fn.isEmpty() )
return;
insertPlainText(fn);