Compare commits
1 Commits
1676b3e1a0
...
383eefce9c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
383eefce9c |
@@ -1998,15 +1998,18 @@ class Silo_BOM:
|
||||
|
||||
obj = get_tracked_object(doc)
|
||||
if not obj:
|
||||
FreeCAD.Console.PrintError("No tracked Silo item in active document.\n")
|
||||
from PySide import QtGui as _qg
|
||||
|
||||
_qg.QMessageBox.warning(
|
||||
reply = QtGui.QMessageBox.question(
|
||||
None,
|
||||
"BOM",
|
||||
"This document is not registered with Silo.\nUse Silo > New to register it first.",
|
||||
"This document is not registered with Silo.\n\nRegister it now?",
|
||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
|
||||
)
|
||||
return
|
||||
if reply != QtGui.QMessageBox.Yes:
|
||||
return
|
||||
FreeCADGui.runCommand("Silo_New")
|
||||
obj = get_tracked_object(doc)
|
||||
if not obj:
|
||||
return
|
||||
|
||||
part_number = obj.SiloPartNumber
|
||||
|
||||
|
||||
Reference in New Issue
Block a user