Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
96c58196
Commit
96c58196
authored
Mar 09, 2011
by
Sebastian Eichelbaum
Browse files
[CHANGE] - owp extension gets added automatically if not present in save dialog for project files.
parent
27d38fcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
src/gui/qt4/WMainWindow.cpp
src/gui/qt4/WMainWindow.cpp
+9
-3
No files found.
src/gui/qt4/WMainWindow.cpp
View file @
96c58196
...
...
@@ -576,8 +576,7 @@ void WMainWindow::projectSave( const std::vector< boost::shared_ptr< WProjectFil
fd
.
setAcceptMode
(
QFileDialog
::
AcceptSave
);
QStringList
filters
;
filters
<<
"Project File (*.owproj *.owp)"
<<
"Any files (*)"
;
filters
<<
"Project File (*.owproj *.owp)"
;
fd
.
setNameFilters
(
filters
);
fd
.
setViewMode
(
QFileDialog
::
Detail
);
QStringList
fileNames
;
...
...
@@ -589,8 +588,15 @@ void WMainWindow::projectSave( const std::vector< boost::shared_ptr< WProjectFil
QStringList
::
const_iterator
constIterator
;
for
(
constIterator
=
fileNames
.
constBegin
();
constIterator
!=
fileNames
.
constEnd
();
++
constIterator
)
{
std
::
string
filename
=
(
*
constIterator
).
toStdString
();
// append owp if not existent
if
(
filename
.
rfind
(
".owp"
)
==
std
::
string
::
npos
)
{
filename
+=
".owp"
;
}
boost
::
shared_ptr
<
WProjectFile
>
proj
=
boost
::
shared_ptr
<
WProjectFile
>
(
new
WProjectFile
(
(
*
constIterator
).
toStdString
()
)
new
WProjectFile
(
filename
)
);
try
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment