/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/mainwindow.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/mainwindow.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 13 by bh, Fri Aug 31 15:33:42 2001 UTC revision 18 by bh, Mon Sep 3 16:25:09 2001 UTC
# Line 249  class MainWindow(wxFrame): Line 249  class MainWindow(wxFrame):
249              filename = dlg.GetPath()              filename = dlg.GetPath()
250              title = os.path.splitext(os.path.basename(filename))[0]              title = os.path.splitext(os.path.basename(filename))[0]
251              layer = Layer(title, filename)              layer = Layer(title, filename)
252              self.canvas.Map().AddLayer(layer)              map = self.canvas.Map()
253                has_layers = map.HasLayers()
254                map.AddLayer(layer)
255                if not has_layers:
256                    # if we're adding a layer to an empty map, for the new
257                    # map to the window
258                    self.canvas.FitMapToWindow()
259          dlg.Destroy()          dlg.Destroy()
260    
261      def RemoveLayer(self):      def RemoveLayer(self):

Legend:
Removed from v.13  
changed lines
  Added in v.18

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26