[Libreoffice-bugs] [Bug 125609] radiobutton receives item status changed event after listbox value selection
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Jun 11 13:35:04 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=125609
Olivier R. <olivier.dev at grammalecte.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |olivier.dev at grammalecte.net
--- Comment #10 from Olivier R. <olivier.dev at grammalecte.net> ---
I was about to create a new bug when I discovered this one.
The bug I’ve encountered looks different from the one reported here, even if it
is related to RadioButton also. Though when I tested the last build of LO
6.2.5, it was solved. So I assume it is somehow related.
So I report the issue I have seen, for informative purpose, in case it might
help. Sorry if it doesn’t.
Bug from LO 6.2.0 to LO 6.2.4.
If I build a dialog box with RadioBoxes, then update the State of a RadioBox,
the change is ignored.
The RadioButton is not updated.
Here is the code :
class MyDialogBox (unohelper.Base, XActionListener, XJobExecutor):
def __init__ (self, ctx):
self.ctx = ctx
self.xSvMgr = self.ctx.ServiceManager
self.xContainer = None
self.xDialog = None
def _addWidget (self, name, wtype, x, y, w, h, **kwargs):
xWidget =
self.xDialog.createInstance('com.sun.star.awt.UnoControl%sModel' % wtype)
xWidget.Name = name
xWidget.PositionX = x
xWidget.PositionY = y
xWidget.Width = w
xWidget.Height = h
for k, w in kwargs.items():
setattr(xWidget, k, w)
self.xDialog.insertByName(name, xWidget)
return xWidget
def run (self, sLang):
self.xOptionNode =
helpers.getConfigSetting("/org.openoffice.MyAddonNode/Options/", True)
# dialog
self.xDialog =
self.xSvMgr.createInstanceWithContext('com.sun.star.awt.UnoControlDialogModel',
self.ctx)
...
self.xRadioButton1 = self._addWidget('radio1', 'RadioButton', ...)
self.xRadioButton2 = self._addWidget('radio2', 'RadioButton', ...)
self.xRadioButton3 = self._addWidget('radio3', 'RadioButton', ...)
...
# reading options from configuration
xChild = self.xOptionNode.getByName("option_node")
sValue = xChild.getPropertyValue("option_value")
if sValue == "something":
self.xRadioButton1.State = 1
elif sValue = "another_thing":
self.xRadioButton2.State = 1
else:
self.xRadioButton3.State = 1
# !!!!!!!!!!!!!!!!!!!!!! BUG HERE !!!!!!!!!!!!!!!!!!!!!!!!!
# no change visible on the dialog box
# the first radio box is selected whatever the value is.
# container
self.xContainer =
self.xSvMgr.createInstanceWithContext('com.sun.star.awt.UnoControlDialog',
self.ctx)
self.xContainer.setModel(self.xDialog)
...
self.xContainer.setVisible(False)
toolkit =
self.xSvMgr.createInstanceWithContext('com.sun.star.awt.ExtToolkit', self.ctx)
self.xContainer.createPeer(toolkit, None)
self.xContainer.execute()
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190611/454706ca/attachment.html>
More information about the Libreoffice-bugs
mailing list