Fix messageboxes
This commit is contained in:
parent
ce56578c61
commit
b078b39779
|
@ -231,8 +231,8 @@ class _CommandCompoundFilter:
|
||||||
else:
|
else:
|
||||||
mb = QtGui.QMessageBox()
|
mb = QtGui.QMessageBox()
|
||||||
mb.setIcon(mb.Icon.Warning)
|
mb.setIcon(mb.Icon.Warning)
|
||||||
mb.setText(_translate("Lattice_CompoundFilter", "Select a shape that is a compound, first! Second selected item (optional) will be treated as a stencil.", None))
|
mb.setText(translate("Lattice_CompoundFilter", "Select a shape that is a compound, first! Second selected item (optional) will be treated as a stencil.", None))
|
||||||
mb.setWindowTitle(_translate("Lattice_CompoundFilter","Bad selection", None))
|
mb.setWindowTitle(translate("Lattice_CompoundFilter","Bad selection", None))
|
||||||
mb.exec_()
|
mb.exec_()
|
||||||
|
|
||||||
def IsActive(self):
|
def IsActive(self):
|
||||||
|
@ -276,8 +276,8 @@ class _CommandExplode:
|
||||||
else:
|
else:
|
||||||
mb = QtGui.QMessageBox()
|
mb = QtGui.QMessageBox()
|
||||||
mb.setIcon(mb.Icon.Warning)
|
mb.setIcon(mb.Icon.Warning)
|
||||||
mb.setText(_translate("Lattice_CompoundFilter", "Select a shape that is a compound, first!", None))
|
mb.setText(translate("Lattice_CompoundFilter", "Select a shape that is a compound, first!", None))
|
||||||
mb.setWindowTitle(_translate("Lattice_CompoundFilter","Bad selection", None))
|
mb.setWindowTitle(translate("Lattice_CompoundFilter","Bad selection", None))
|
||||||
mb.exec_()
|
mb.exec_()
|
||||||
|
|
||||||
def IsActive(self):
|
def IsActive(self):
|
||||||
|
|
|
@ -130,8 +130,8 @@ class _CommandFuseCompound:
|
||||||
else:
|
else:
|
||||||
mb = QtGui.QMessageBox()
|
mb = QtGui.QMessageBox()
|
||||||
mb.setIcon(mb.Icon.Warning)
|
mb.setIcon(mb.Icon.Warning)
|
||||||
mb.setText(_translate("Lattice_FuseCompound", "Select a shape that is a compound whose children intersect, first!", None))
|
mb.setText(translate("Lattice_FuseCompound", "Select a shape that is a compound whose children intersect, first!", None))
|
||||||
mb.setWindowTitle(_translate("Lattice_FuseCompound","Bad selection", None))
|
mb.setWindowTitle(translate("Lattice_FuseCompound","Bad selection", None))
|
||||||
mb.exec_()
|
mb.exec_()
|
||||||
|
|
||||||
def IsActive(self):
|
def IsActive(self):
|
||||||
|
|
|
@ -206,8 +206,8 @@ class _CommandBoundBox:
|
||||||
else:
|
else:
|
||||||
mb = QtGui.QMessageBox()
|
mb = QtGui.QMessageBox()
|
||||||
mb.setIcon(mb.Icon.Warning)
|
mb.setIcon(mb.Icon.Warning)
|
||||||
mb.setText(_translate("Lattice_BoundBox", "Select a shape to make a bounding box for, first!", None))
|
mb.setText(translate("Lattice_BoundBox", "Select a shape to make a bounding box for, first!", None))
|
||||||
mb.setWindowTitle(_translate("Lattice_BoundBox","Bad selection", None))
|
mb.setWindowTitle(translate("Lattice_BoundBox","Bad selection", None))
|
||||||
mb.exec_()
|
mb.exec_()
|
||||||
|
|
||||||
def IsActive(self):
|
def IsActive(self):
|
||||||
|
|
|
@ -36,10 +36,10 @@ except AttributeError:
|
||||||
return s
|
return s
|
||||||
try:
|
try:
|
||||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||||
def _translate(context, text, disambig):
|
def translate(context, text, disambig):
|
||||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
def _translate(context, text, disambig):
|
def translate(context, text, disambig):
|
||||||
return QtGui.QApplication.translate(context, text, disambig)
|
return QtGui.QApplication.translate(context, text, disambig)
|
||||||
#--------------------------/translation-related code ----------------------------------------
|
#--------------------------/translation-related code ----------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -170,8 +170,8 @@ class _CommandLatticeDowngrade:
|
||||||
else:
|
else:
|
||||||
mb = QtGui.QMessageBox()
|
mb = QtGui.QMessageBox()
|
||||||
mb.setIcon(mb.Icon.Warning)
|
mb.setIcon(mb.Icon.Warning)
|
||||||
mb.setText(_translate("Lattice_Downgrade", "Select a shape to downgrade, first!", None))
|
mb.setText(translate("Lattice_Downgrade", "Select a shape to downgrade, first!", None))
|
||||||
mb.setWindowTitle(_translate("Lattice_Downgrade","Bad selection", None))
|
mb.setWindowTitle(translate("Lattice_Downgrade","Bad selection", None))
|
||||||
mb.exec_()
|
mb.exec_()
|
||||||
|
|
||||||
def IsActive(self):
|
def IsActive(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user