349 |
""" |
""" |
350 |
self.SetStatusText(text) |
self.SetStatusText(text) |
351 |
|
|
352 |
|
def OpenOrRaiseDialog(self, name, dialog_class, *args, **kw): |
353 |
|
""" |
354 |
|
Open or raise a dialog. |
355 |
|
|
356 |
|
If a dialog with the denoted name does already exist it is |
357 |
|
raised. Otherwise a new dialog, an instance of dialog_class, |
358 |
|
is created, inserted into the main list and displayed. |
359 |
|
""" |
360 |
|
dialog = self.get_open_dialog(name) |
361 |
|
|
362 |
|
if dialog is None: |
363 |
|
dialog = dialog_class(self, name, *args, **kw) |
364 |
|
self.add_dialog(name, dialog) |
365 |
|
dialog.Show(True) |
366 |
|
else: |
367 |
|
dialog.Raise() |
368 |
|
|
369 |
def save_modified_session(self, can_veto = 1): |
def save_modified_session(self, can_veto = 1): |
370 |
"""If the current session has been modified, ask the user |
"""If the current session has been modified, ask the user |
371 |
whether to save it and do so if requested. Return the outcome of |
whether to save it and do so if requested. Return the outcome of |
722 |
self.OpenLayerProperties(layer) |
self.OpenLayerProperties(layer) |
723 |
|
|
724 |
def OpenLayerProperties(self, layer, group = None): |
def OpenLayerProperties(self, layer, group = None): |
725 |
name = "layer_properties" + str(id(layer)) |
""" |
726 |
dialog = self.get_open_dialog(name) |
Open or raise the properties dialog. |
|
|
|
|
if dialog is None: |
|
|
dialog = Classifier(self, name, layer, group) |
|
|
self.add_dialog(name, dialog) |
|
|
dialog.Show() |
|
|
dialog.Raise() |
|
727 |
|
|
728 |
|
This method opens or raises the properties dialog for the |
729 |
|
currently selected layer if one is defined for this layer |
730 |
|
type. |
731 |
|
""" |
732 |
|
name = "layer_properties" + str(id(layer)) |
733 |
|
self.OpenOrRaiseDialog(name, Classifier, layer, group = group) |
734 |
|
|
735 |
def LayerJoinTable(self): |
def LayerJoinTable(self): |
736 |
layer = self.canvas.SelectedLayer() |
layer = self.canvas.SelectedLayer() |
737 |
if layer is not None: |
if layer is not None: |