Menu

#109 TaurusValueCombobox inconsistent pendingOperations state

Jan15
resolved
None
bug
2015-03-30
2014-09-16
No

In some cases, when one creates a TaurusValueCombobox and sets the model after having called addValueNames, the widget is left in an inconsistent "pending operations" state (the write value shown is the same as the one applied, but the widget reports having pending operations -i.e. it is "blue")

Note: Here is the code I use to reproduce it. Unfortunately, I haven't managed to reproduce this using TangoTest.

import sys
import taurus
from taurus.qt.qtgui.application import TaurusApplication
from taurus.qt.qtgui.input import TaurusValueComboBox
#model = 'sys/tg_test/1/boolean_scalar'
model = 'sr10/rf/lyrtechdllrf-b01/loopenable'
names = [
    ('Off', False),
    ('On', True),
]
#taurus.Attribute(model).write(True)
a = TaurusApplication([])
w = TaurusValueComboBox()
#w.setModel(model)
w.addValueNames(names)
w.setModel(model)
w.show()
sys.exit(a.exec_())

To solve this it is enougth to add a call to emitValueChanged() at the end of the setModel method. I'll send a patch to the devel list.

Discussion

  • Zbigniew Reszela

    • status: waiting --> resolved
    • assigned_to: Carlos Pascual
    • Category: pool --> taurus-qt
     
  • Zbigniew Reszela

    Patch sent by CarlosP was applied to develop

     
  • Tiago Coutinho

    Tiago Coutinho - 2015-03-30

    Ticket moved from /p/sardana/tickets/242/

    Can't be converted:

    • _category: taurus-qt