Skip to content

Commit 2517194

Browse files
authored
Merge pull request #28 from KIOS-Research/v1.6
V1.6
2 parents 6f323ee + bff8245 commit 2517194

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

main.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,19 @@ def runexp(self):
174174
return
175175

176176
self.layers = []
177-
for lyr in group_ok.findLayers():
178-
if lyr.itemVisibilityChecked():
179-
self.layers.append(lyr.layer())
177+
try:
178+
for lyr in group_ok.findLayers():
179+
if lyr.itemVisibilityChecked():
180+
self.layers.append(lyr.layer())
181+
except:
182+
msg = QMessageBox()
183+
msg.setIcon(QMessageBox.Warning)
184+
msg.setWindowTitle('Export INP File')
185+
msg.setText("Please check a group.")
186+
msg.setStandardButtons(QMessageBox.Ok)
187+
msg.exec_()
188+
return
189+
180190
#self.layers = [lyr.layer() for lyr in group_ok.findLayers()] #[layer for layer in QgsProject.instance().mapLayers().values()]#self.canvas.layers()
181191
self.layer_list = []
182192
self.layer_list = ['NONE']
@@ -199,7 +209,7 @@ def cancel(self):
199209
self.layer_list = []
200210
self.layer_list = ['NONE']
201211
for sect in self.sections:
202-
exec ('self.dlg.sect_' + sect + '.clear()')
212+
exec('self.dlg.sect_' + sect + '.clear()')
203213
self.dlg.close()
204214

205215
def toolButtonOut(self):

metadata.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ name=ImportEpanetInpFiles
1111
qgisMinimumVersion=2.99
1212
qgisMaximumVersion=3.99
1313
description=IMPORT/EXPORT EPANET INP Files
14-
version=1.5
14+
version=1.6
1515
author=Marios S. Kyriakou, KIOS Research and Innovation Center of Excellence (KIOS CoE)
1616
email=mkiria01@ucy.ac.cy
1717
about=This tool can be used to IMPORT EPANET INP File to shapefiles and adds them in the QGIS canvas. Also, the shapefiles stored into the _shapefiles_ folder. Can be used to EXPORT EPANET INP File.
@@ -21,7 +21,9 @@ about=This tool can be used to IMPORT EPANET INP File to shapefiles and adds the
2121
# Optional items:
2222

2323
# Uncomment the following line and add your changelog:
24-
changelog=2019-06-16 ImportEpanetInpFiles 1.5:
24+
changelog=2019-08-07 ImportEpanetInpFiles 1.6:
25+
Fix bug in descriptions field
26+
2019-06-16 ImportEpanetInpFiles 1.5:
2527
Fixed issue with curve types, fixed issue when export inp, support more demand categories (Thanks to Paulos Paulou @ppavlo02)
2628
Add selector for coordinate system when Import or Export EPANET files.
2729
2018-06-14 ImportEpanetInpFiles 1.4:

0 commit comments

Comments
 (0)