def closeDialogWithResult(self, button): if button==self.BUTTON_OK: self.controls.name.setValue(self.controls.name.getValue().strip()) # check if valid layer name was entered # new layer mode should allow empty value if not self.newLayerMode and self.layerNameValue.get().strip()=='': utils.confirmDialog( title='Validation Error', message="layer name cannot be blank", button=['Ok'], defaultButton='Ok') return BaseDialog.closeDialogWithResult(self, button)
def closeDialogWithResult(self, buttonID): if buttonID==self.BUTTON_OK: self.controls.name.setValue(self.controls.name.getValue().strip()) # check if valid layer name was entered # new layer mode should allow empty value if not self.newLayerMode and self.layerNameValue.get().strip()=='': Utils.confirmDialog( title='Validation Error', message="layer name cannot be blank", button=['Ok'], defaultButton='Ok') return BaseDialog.closeDialogWithResult(self, buttonID)