mirror of https://github.com/vitalif/openscad
Merge branch 'OskarLinde-proxy-icons'
commit
758edd0ecc
|
@ -10,9 +10,6 @@
|
|||
<height>647</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="margin">
|
||||
|
|
|
@ -559,19 +559,31 @@ MainWindow::setFileName(const QString &filename)
|
|||
if (filename.isEmpty()) {
|
||||
this->fileName.clear();
|
||||
this->top_ctx.setDocumentPath(currentdir);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)
|
||||
setWindowTitle("");
|
||||
setWindowFilePath("untitled.scad");
|
||||
#else
|
||||
setWindowTitle("OpenSCAD - New Document[*]");
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
QFileInfo fileinfo(filename);
|
||||
setWindowTitle("OpenSCAD - " + fileinfo.fileName() + "[*]");
|
||||
|
||||
// Check that the canonical file path exists - only update recent files
|
||||
// if it does. Should prevent empty list items on initial open etc.
|
||||
QString infoFileName = fileinfo.absoluteFilePath();
|
||||
|
||||
if (!infoFileName.isEmpty()) {
|
||||
this->fileName = infoFileName;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)
|
||||
setWindowTitle("");
|
||||
this->setWindowFilePath(infoFileName);
|
||||
#else
|
||||
setWindowTitle("OpenSCAD - " + fileinfo.fileName() + "[*]");
|
||||
#endif
|
||||
} else {
|
||||
this->fileName = fileinfo.fileName();
|
||||
setWindowTitle("OpenSCAD - " + fileinfo.fileName() + "[*]");
|
||||
}
|
||||
|
||||
this->top_ctx.setDocumentPath(fileinfo.dir().absolutePath().toLocal8Bit().constData());
|
||||
|
|
Loading…
Reference in New Issue