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