Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
melview
Commits
4ee3b37b
Commit
4ee3b37b
authored
Nov 17, 2012
by
Dave Flitney
Browse files
Save as... now uses the current dir as default location
parent
f3977763
Changes
1
Hide whitespace changes
Inline
Side-by-side
melview/melodic_traits.py
View file @
4ee3b37b
...
...
@@ -281,7 +281,9 @@ Are you sure you want to continue?
# info.object.reset_zoom()
def
do_save_as
(
self
,
info
):
dialog
=
FileDialog
(
action
=
"save as"
,
wildcard
=
info
.
object
.
file_wildcard
)
default_directory
=
os
.
path
.
split
(
info
.
object
.
dirpath
)[
0
]
dialog
=
FileDialog
(
action
=
"save as"
,
wildcard
=
info
.
object
.
file_wildcard
,
default_directory
=
default_directory
)
dialog
.
open
()
if
dialog
.
return_code
==
OK
:
info
.
object
.
filedir
=
dialog
.
directory
...
...
@@ -415,7 +417,7 @@ class MelodicWindow(HasTraits):
mm
=
int
(
ceil
(
sqrt
(
z
)
*
1.5
)
-
1
)
else
:
mm
=
ncols
nn
=
z
/
mm
+
1
nn
=
y
/
mm
+
1
M
=
zeros
((
mm
*
x
,
nn
*
z
))
...
...
@@ -436,7 +438,7 @@ class MelodicWindow(HasTraits):
mm
=
int
(
ceil
(
sqrt
(
y
)
*
1.5
)
-
1
)
else
:
mm
=
ncols
nn
=
y
/
mm
+
1
nn
=
x
/
mm
+
1
M
=
zeros
((
mm
*
y
,
nn
*
z
))
...
...
@@ -459,7 +461,7 @@ class MelodicWindow(HasTraits):
mm
=
ncols
nn
=
z
/
mm
+
1
M
=
zeros
((
mm
*
x
,
nn
*
y
))
image_id
=
0
for
j
in
range
(
mm
):
for
k
in
range
(
nn
):
...
...
Write
Preview
Supports
Markdown
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