Remember the last format used to export 2D Views.
This helps a lot when exporting a lot of views, e.g. for shop drawings.
This commit is contained in:
parent
d585f0d1ff
commit
22d43d5b83
@ -5,6 +5,7 @@
|
|||||||
// Copyright 2008-2013 Jonathan Westhues.
|
// Copyright 2008-2013 Jonathan Westhues.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "solvespace.h"
|
#include "solvespace.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
SolveSpaceUI SolveSpace::SS;
|
SolveSpaceUI SolveSpace::SS;
|
||||||
Sketch SolveSpace::SK;
|
Sketch SolveSpace::SK;
|
||||||
@ -378,6 +379,13 @@ void SolveSpaceUI::UpdateWindowTitle(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static std::string Extname(std::string filename) {
|
||||||
|
int dot = filename.rfind('.');
|
||||||
|
if(dot >= 0)
|
||||||
|
return filename.substr(dot + 1, filename.length());
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
void SolveSpaceUI::MenuFile(int id) {
|
void SolveSpaceUI::MenuFile(int id) {
|
||||||
if(id >= RECENT_OPEN && id < (RECENT_OPEN+MAX_RECENT)) {
|
if(id >= RECENT_OPEN && id < (RECENT_OPEN+MAX_RECENT)) {
|
||||||
if(!SS.OkayToStartNewFile()) return;
|
if(!SS.OkayToStartNewFile()) return;
|
||||||
@ -438,8 +446,10 @@ void SolveSpaceUI::MenuFile(int id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case GraphicsWindow::MNU_EXPORT_VIEW: {
|
case GraphicsWindow::MNU_EXPORT_VIEW: {
|
||||||
char exportFile[MAX_PATH] = "";
|
char exportFile[MAX_PATH] = "", exportExt[10] = VEC_EXT;
|
||||||
if(!GetSaveFile(exportFile, VEC_EXT, VEC_PATTERN)) break;
|
CnfThawString(exportExt, sizeof(exportExt), "2DExportFormat");
|
||||||
|
if(!GetSaveFile(exportFile, exportExt, VEC_PATTERN)) break;
|
||||||
|
CnfFreezeString(Extname(exportFile).c_str(), "2DExportFormat");
|
||||||
|
|
||||||
// If the user is exporting something where it would be
|
// If the user is exporting something where it would be
|
||||||
// inappropriate to include the constraints, then warn.
|
// inappropriate to include the constraints, then warn.
|
||||||
|
Loading…
Reference in New Issue
Block a user