Mercurial > octave-nkf
changeset 20045:b08c13ed4a8c
Qt PopupMenuControl: son creation se index to Value, and dont fire callback on programatic value set (Bug #44687)
* libgui/graphics/PopupMenuControl.cc
(PopupMenuControl::PopupMenuControl): call update to ID_VALUE
(PopupMenuControl::update): set m_blockUpdate whilst in update for ID_VALUE
author | John Donoghue |
---|---|
date | Wed, 01 Apr 2015 15:16:14 -0400 |
parents | f2dea119369e |
children | 2535b9ffa2fc |
files | libgui/graphics/PopupMenuControl.cc |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/PopupMenuControl.cc Wed Apr 01 15:16:12 2015 -0400 +++ b/libgui/graphics/PopupMenuControl.cc Wed Apr 01 15:16:14 2015 -0400 @@ -56,6 +56,8 @@ box->addItems (Utils::fromStdString (up.get_string_string ()).split ('|')); + update (uicontrol::properties::ID_VALUE); + connect (box, SIGNAL (currentIndexChanged (int)), SLOT (currentIndexChanged (int))); } @@ -97,6 +99,7 @@ break; case uicontrol::properties::ID_VALUE: + m_blockUpdate = true; { Matrix value = up.get_value ().matrix_value (); @@ -111,6 +114,7 @@ } } } + m_blockUpdate = false; break; default: