Skip to content

Commit

Permalink
Merge pull request #28 from KIOS-Research/v1.6
Browse files Browse the repository at this point in the history
V1.6
  • Loading branch information
Mariosmsk committed Nov 15, 2019
2 parents 6f323ee + bff8245 commit 2517194
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
18 changes: 14 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,19 @@ def runexp(self):
return

self.layers = []
for lyr in group_ok.findLayers():
if lyr.itemVisibilityChecked():
self.layers.append(lyr.layer())
try:
for lyr in group_ok.findLayers():
if lyr.itemVisibilityChecked():
self.layers.append(lyr.layer())
except:
msg = QMessageBox()
msg.setIcon(QMessageBox.Warning)
msg.setWindowTitle('Export INP File')
msg.setText("Please check a group.")
msg.setStandardButtons(QMessageBox.Ok)
msg.exec_()
return

#self.layers = [lyr.layer() for lyr in group_ok.findLayers()] #[layer for layer in QgsProject.instance().mapLayers().values()]#self.canvas.layers()
self.layer_list = []
self.layer_list = ['NONE']
Expand All @@ -199,7 +209,7 @@ def cancel(self):
self.layer_list = []
self.layer_list = ['NONE']
for sect in self.sections:
exec ('self.dlg.sect_' + sect + '.clear()')
exec('self.dlg.sect_' + sect + '.clear()')
self.dlg.close()

def toolButtonOut(self):
Expand Down
6 changes: 4 additions & 2 deletions metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name=ImportEpanetInpFiles
qgisMinimumVersion=2.99
qgisMaximumVersion=3.99
description=IMPORT/EXPORT EPANET INP Files
version=1.5
version=1.6
author=Marios S. Kyriakou, KIOS Research and Innovation Center of Excellence (KIOS CoE)
email=mkiria01@ucy.ac.cy
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.
Expand All @@ -21,7 +21,9 @@ about=This tool can be used to IMPORT EPANET INP File to shapefiles and adds the
# Optional items:

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

0 comments on commit 2517194

Please sign in to comment.