Skip to content

Commit 66304c7

Browse files
author
stephanie
committed
add dialog
1 parent 4ac92d1 commit 66304c7

File tree

4 files changed

+20
-9
lines changed

4 files changed

+20
-9
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ before_script:
6464
- chmod +x ./ci-helpers/travis/mysql_setup.sh
6565
# - chmod +x ./ci-helpers/travis/postgres_setup.sh
6666
- chmod +x ./ci-helpers/travis/freetds.sh
67+
6768
- ./ci-helpers/travis/mysql_setup.sh
6869
# - ./ci-helpers/travis/postgres_setup.sh
6970
- ./ci-helpers/travis/freetds.sh

appveyor.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ install:
9393
# the parent CMD process).
9494
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
9595
# add databases
96-
- "SET PATH=%POSTGRES_PATH%\bin;%MYSQL_PATH%\bin;%PATH%"
96+
- "SET PATH=%POSTGRES_PATH%\\bin;%MYSQL_PATH%\\bin;%PATH%"
9797
- "activate test"
9898

9999
# Check that we have the expected version and architecture for Python
@@ -110,12 +110,12 @@ build_script:
110110
- sqlcmd -S localhost,1433 -U sa -P Password12! -Q "CREATE DATABASE odm" -d "master"
111111
- sqlcmd -S localhost,1433 -U sa -P Password12! -i tests\data\sampledb\odm_mssql.sql -d "odm"
112112
- sqlcmd -S localhost,1433 -U sa -P Password12! -Q "select table_name from information_schema.tables" -d "odm"
113-
# # postgres
114-
# - psql createdb odm
115-
# - psql -d odm -a -f tests\data\sampledb\odm_postgres.sql
116-
# # mysql
117-
# - mysql -e "drop database test; create database odm;" --user=root
118-
# - mysql odm < tests\data\sampledb\odm_mysql.sql --user=root
113+
# postgres
114+
- psql createdb odm
115+
- psql -d odm -a -f tests\data\sampledb\odm_postgres.sql
116+
# mysql
117+
- mysql -e "drop database test; create database odm;" --user=root
118+
- mysql odm < tests\data\sampledb\odm_mysql.sql --user=root
119119

120120
test_script:
121121
# Run the project tests

odmtools/gui/frmODMTools.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from odmtools.controller.frmDataTable import FrmDataTable
1313
import mnuRibbon
1414
import pnlPlot
15+
import pnlPlot
1516
import pnlDataTable
1617
import wx.lib.agw.aui as aui
1718
import wx.py.crust
@@ -55,6 +56,7 @@ def __init__(self, **kwargs):
5556

5657
self.service_manager = ServiceManager()
5758
self.record_service = None
59+
self.scriptcreate = False
5860

5961
series_service = self._init_database()
6062
if series_service:
@@ -384,7 +386,7 @@ def onSetScriptTitle(self, title):
384386
def addEdit(self, event):
385387

386388
with wx.BusyInfo("Please wait for a moment while ODMTools fetches the data and stores it in our database", parent=self):
387-
389+
self.scriptcreate = True
388390
isSelected, seriesID = self.pnlSelector.onReadyToEdit()
389391
logger.info("Beginning editing seriesID: %s"%str(seriesID))
390392

@@ -496,6 +498,15 @@ def onClose(self, event):
496498
Closes ODMTools Python
497499
Closes AUI Manager then closes MainWindow
498500
"""
501+
502+
#check to see if a script has been created
503+
if self.scriptcreate:
504+
msg = wx.MessageDialog(None, 'Would you like to save your editing script',
505+
'Save Script', wx.YES_NO | wx.ICON_QUESTION)
506+
value = msg.ShowModal()
507+
if value == wx.ID_YES:
508+
pnlScript.OnSaveAs(event)
509+
499510
# deinitialize the frame manager
500511
self.pnlPlot.Close()
501512
try:

toolsenvironment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ dependencies:
2929
- pyodbc==3.0.7
3030
- python-dateutil==2.4.1
3131
- wxpython-common==3.0.0.0
32-

0 commit comments

Comments
 (0)