mirror of https://github.com/vitalif/openscad
Suggest filename based on document name on export
parent
22135401c1
commit
f06b7025ba
|
@ -58,8 +58,6 @@ o Preferences
|
|||
- Default language feature settings
|
||||
- Auto-view CSG/thrown together on load
|
||||
- Make the library search path configurable?
|
||||
o Export etc.:
|
||||
- Remember document name and suggest that as export filename
|
||||
o MDI
|
||||
- Think about how to do MDI the right way
|
||||
- Ctrl-W should close the current dialog, not the current main window
|
||||
|
|
|
@ -1309,8 +1309,10 @@ void MainWindow::actionExportSTLorOFF(bool)
|
|||
return;
|
||||
}
|
||||
|
||||
QString suffix = stl_mode ? ".stl" : ".off";
|
||||
QString stl_filename = QFileDialog::getSaveFileName(this,
|
||||
stl_mode ? "Export STL File" : "Export OFF File", "",
|
||||
stl_mode ? "Export STL File" : "Export OFF File",
|
||||
this->fileName.isEmpty() ? "Untitled"+suffix : QFileInfo(this->fileName).baseName()+suffix,
|
||||
stl_mode ? "STL Files (*.stl)" : "OFF Files (*.off)");
|
||||
if (stl_filename.isEmpty()) {
|
||||
PRINTF("No filename specified. %s export aborted.", stl_mode ? "STL" : "OFF");
|
||||
|
@ -1372,7 +1374,9 @@ void MainWindow::actionExportDXF()
|
|||
}
|
||||
|
||||
QString dxf_filename = QFileDialog::getSaveFileName(this,
|
||||
"Export DXF File", "", "DXF Files (*.dxf)");
|
||||
"Export DXF File",
|
||||
this->fileName.isEmpty() ? "Untitled.dxf" : QFileInfo(this->fileName).baseName()+".dxf",
|
||||
"DXF Files (*.dxf)");
|
||||
if (dxf_filename.isEmpty()) {
|
||||
PRINTF("No filename specified. DXF export aborted.");
|
||||
clearCurrentOutput();
|
||||
|
|
Loading…
Reference in New Issue