Commits

Omni Flux committed f7d01a3

Another fix for resuming FLM files

  • Participants
  • Parent commits ee5e349

Comments (0)

Files changed (1)

qtgui/mainwindow.cpp

 	if(lxsFileName.isNull())
 		return;
 
-	setCurrentFile(lxsFileName); // make sure m_lastOpendir stays at lxs-location
-
 	// suggest .flm file with same name if it exists
-	QFileInfo openDirFile(m_lastOpendir + "/" + m_CurrentFileBaseName + ".flm");
-	QString openDirName = openDirFile.exists() ? openDirFile.absoluteFilePath() : m_lastOpendir;
+	QFileInfo info(lxsFileName);
+	QFileInfo openDirFile(info.absolutePath() + "/" + info.completeBaseName() + ".flm");
+	QString openDirName = openDirFile.exists() ? openDirFile.absoluteFilePath() : info.absolutePath();
 
 	QString flmFileName = QFileDialog::getOpenFileName(this, tr("Choose an FLM file to open"), openDirName, tr("LuxRender FLM files (*.flm)"));