Fixed conflict with PyQt5. Cleanup. Log level back to debug.

This commit is contained in:
jpcaram
2015-03-31 10:41:32 -04:00
parent 35754aa2b5
commit aa951e277b
3 changed files with 12 additions and 8 deletions

View File

@@ -7,6 +7,11 @@
############################################################
from PyQt4 import QtGui, QtCore
# Prevent conflict with Qt5 and above.
from matplotlib import use as mpl_use
mpl_use("Qt4Agg")
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
import FlatCAMApp
@@ -264,8 +269,8 @@ class PlotCanvas:
# Adjust axes
for ax in self.figure.get_axes():
ax.set_xlim((xmin + x*width, xmax + x*width))
ax.set_ylim((ymin + y*height, ymax + y*height))
ax.set_xlim((xmin + x * width, xmax + x * width))
ax.set_ylim((ymin + y * height, ymax + y * height))
# Re-draw
self.canvas.draw()
@@ -302,7 +307,7 @@ class PlotCanvas:
if event.button == 'up':
self.zoom(1.5, self.mouse)
else:
self.zoom(1/1.5, self.mouse)
self.zoom(1 / 1.5, self.mouse)
return
if self.key == 'shift':