ID 544556 - Boolean_Knob.setLabel() does not update the label name when the Properties are open

Follow

Problem summary:
Boolean_Knob.setLabel() does not update the label name when the Properties are open
 
Customer reported version:
Nuke 13.2v5
 
Customer reported platform:
Windows 10
 
Steps to reproduce:
1) Launch Nuke and create a NoOp node in the Node Graph.
2) Open the Script Editor window and run the following code:
n = nuke.selectedNode()n['hide_input'].setLabel("New Label")
3) Observe how the label does not update until the Properties are closed and reopened, pictured below:

 
Expected behavior:
Boolean knob labels should update automatically and not behave differently than the labels for other knob types.
 
Actual behavior:
If a node's Properties are open, using setLabel() on a Boolean knob will not visually update until the Properties are closed and reopened.
 
Workaround:
You can utilize hideControlPanel() and showControlPanel() to Pythonically open and close the Properties of any given node. However, you may encounter another known issue (ID 353275) where the Properties will not display if showControlPanel() is called after hideControlPanel() in the same script session.
 
That being said, it is possible to work around both issues with the Qtimer.singleShot() function from PySide2, and an example is below:
from PySide2 import QtCoreimport randomn = nuke.selectedNode() #expecting a NoOp noderandomStr = str(random.random())n['hide_input'].setLabel(randomStr)if n.shown():    print("Properties were open, refreshing...")    n.hideControlPanel()    QtCore.QTimer.singleShot(1, lambda: n.showControlPanel())else:    print("Properties were not open, opening...")        n.showControlPanel()
 
Reproduced by Support in:
Nuke 14.0v5 - Windows 10, CentOS 7
Nuke 13.0v1 - Windows 10
Nuke 12.0v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.0v1 - Windows 10, CentOS 7
 
Earliest version tested:
Nuke 10.0v1 - This issue appears to be in all tested versions of the product 

    We're sorry to hear that

    Please tell us why