Skip to content

Commit 05ed8ba

Browse files
committed
Merge remote-tracking branch 'remotes/origin/main'
2 parents c36f2a6 + 74b41ce commit 05ed8ba

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

GSASII/GSASIIplot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5814,7 +5814,11 @@ def SetCursorStatus(newxy,contours=False):
58145814
View = GL.glGetIntegerv(GL.GL_VIEWPORT)
58155815
Tx,Ty,Tz = drawingData['viewPoint'][0]
58165816
tx,ty,tz = GLU.gluProject(Tx,Ty,Tz)
5817-
Cx,Cy,Cz = GLU.gluUnProject(newxy[0],View[3]-newxy[1],tz)
5817+
try:
5818+
Cx,Cy,Cz = GLU.gluUnProject(newxy[0],View[3]-newxy[1],tz)
5819+
except: # not sure why this happens, pyOpenGL 3.1.6 bug on MacOS? (3.1.9 OK)
5820+
G2frame.G2plotNB.status.SetStatusText('Cursor position calc failed',1)
5821+
return
58185822
rho = G2mth.getRho([Cx,Cy,Cz],mapData)
58195823
if contours:
58205824
try:

GSASII/exports/G2export_shelx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def Exporter(self,event=None):
3838
i = self.Phases[phasenam]['pId']
3939
if len(self.phasenam) > 1: # if more than one filename is included, add a phase #
4040
self.filename = os.path.splitext(filename)[1] + "_" + str(i) + self.extension
41-
#fp = self.OpenFile()
41+
self.OpenFile(filename)
4242
# title line
4343
self.Write("TITL from "+str(self.G2frame.GSASprojectfile)+", phase "+str(phasenam))
4444
# get & write cell parameters

0 commit comments

Comments
 (0)