Skip to content

Commit ab3760a

Browse files
committed
qtvcp -fix command line user option
In master we switched to -o (from -U) so we follow that. add the code to pass the info to the handler file.
1 parent 9a4d9c0 commit ab3760a

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/emc/usr_intf/qtvcp/qtvcp.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
, Option( '--push_xid', action='store_true', dest='push_XID'
5050
, help="reparent window into a plug add push the plug xid number to standardout")
5151
, Option( '-u', dest='usermod', default="", help='file path of user defined handler file')
52-
, Option( '-U', dest='useropts', action='append', metavar='USEROPT', default=[]
53-
, help='pass USEROPTs to Python modules')
52+
, Option( '-o', dest='useropts', action='append', metavar='USEROPTS', default=[]
53+
, help='pass USEROPTS strings to handler under self.w.USEROPTIONS_ list varible')
5454
]
5555

5656
class QTVCP:
@@ -189,6 +189,12 @@ def __init__(self):
189189
# initialize the window
190190
window = qt_makegui.VCPWindow(self.hal, PATH)
191191

192+
# give reference to user command line options
193+
if opts.useropts:
194+
window.USEROPTIONS_ = opts.useropts
195+
else:
196+
window.USEROPTIONS_ = None
197+
192198
# load optional user handler file
193199
if opts.usermod:
194200
LOG.debug('Loading the handler file')

0 commit comments

Comments
 (0)