/[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 1076 by frank, Wed May 28 08:25:12 2003 UTC revision 1080 by bh, Wed May 28 09:12:21 2003 UTC
# Line 940  _method_command("layer_jointable", _("&J Line 940  _method_command("layer_jointable", _("&J
940                  sensitive = _has_selected_layer)                  sensitive = _has_selected_layer)
941    
942  def _can_unjoin(context):  def _can_unjoin(context):
943        """Return whether the Layer/Unjoin command can be executed.
944    
945        This is the case if a layer is selected and that layer has a
946        shapestore that has an original shapestore.
947        """
948      layer = context.mainwindow.SelectedLayer()      layer = context.mainwindow.SelectedLayer()
949      return bool(layer and layer.ShapeStore().OrigShapeStore() is not None)      if layer is None:
950            return 0
951        getstore = getattr(layer, "ShapeStore", None)
952        if getstore is not None:
953            return getstore().OrigShapeStore() is not None
954        else:
955            return 0
956  _method_command("layer_unjointable", _("&Unjoin Table..."), "LayerUnjoinTable",  _method_command("layer_unjointable", _("&Unjoin Table..."), "LayerUnjoinTable",
957                  sensitive = _can_unjoin)                  sensitive = _can_unjoin)
958    

Legend:
Removed from v.1076  
changed lines
  Added in v.1080

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26