Merge "Fix [2944349] - WDocAction panel not assigning selected item" from /release
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2944349
This commit is contained in:
parent
ff099422bd
commit
4d1300ed0f
|
@ -176,6 +176,7 @@ public class WDocActionPanel extends Window implements EventListener
|
|||
* Fill actionCombo
|
||||
*/
|
||||
|
||||
boolean firstadded = true;
|
||||
for (int i = 0; i < index; i++)
|
||||
{
|
||||
// Serach for option and add it
|
||||
|
@ -185,11 +186,17 @@ public class WDocActionPanel extends Window implements EventListener
|
|||
{
|
||||
if (options[i].equals(s_value[j]))
|
||||
{
|
||||
lstDocAction.appendItem(s_name[j],s_value[j]);
|
||||
Listitem newitem = lstDocAction.appendItem(s_name[j],s_value[j]);
|
||||
if (firstadded) {
|
||||
// select by default the first added item - can be changed below
|
||||
lstDocAction.setSelectedItem(newitem);
|
||||
firstadded = false;
|
||||
}
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// look if the current DocAction is within the list and assign it as selected if it exists
|
||||
List<Listitem> lst = (List<Listitem>)lstDocAction.getItems();
|
||||
for(Listitem item: lst)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue