Commit 4ee3b37b authored by Dave Flitney's avatar Dave Flitney
Browse files

Save as... now uses the current dir as default location

parent f3977763
...@@ -281,7 +281,9 @@ Are you sure you want to continue? ...@@ -281,7 +281,9 @@ Are you sure you want to continue?
# info.object.reset_zoom() # info.object.reset_zoom()
def do_save_as(self, info): 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() dialog.open()
if dialog.return_code == OK: if dialog.return_code == OK:
info.object.filedir = dialog.directory info.object.filedir = dialog.directory
...@@ -415,7 +417,7 @@ class MelodicWindow(HasTraits): ...@@ -415,7 +417,7 @@ class MelodicWindow(HasTraits):
mm = int(ceil(sqrt(z) * 1.5) - 1) mm = int(ceil(sqrt(z) * 1.5) - 1)
else: else:
mm = ncols mm = ncols
nn = z / mm + 1 nn = y / mm + 1
M = zeros((mm * x, nn * z)) M = zeros((mm * x, nn * z))
...@@ -436,7 +438,7 @@ class MelodicWindow(HasTraits): ...@@ -436,7 +438,7 @@ class MelodicWindow(HasTraits):
mm = int(ceil(sqrt(y) * 1.5) - 1) mm = int(ceil(sqrt(y) * 1.5) - 1)
else: else:
mm = ncols mm = ncols
nn = y / mm + 1 nn = x / mm + 1
M = zeros((mm * y, nn * z)) M = zeros((mm * y, nn * z))
...@@ -459,7 +461,7 @@ class MelodicWindow(HasTraits): ...@@ -459,7 +461,7 @@ class MelodicWindow(HasTraits):
mm = ncols mm = ncols
nn = z / mm + 1 nn = z / mm + 1
M = zeros((mm * x, nn * y)) M = zeros((mm * x, nn * y))
image_id = 0 image_id = 0
for j in range(mm): for j in range(mm):
for k in range(nn): for k in range(nn):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment