Arises from
[Emc-users] Regression in pyvcp's radiobutton from 2.5 to 2.6.5, nothing selected in the hal layer on startup

initval field setting the correct widget to active at initialisation, but changes to prevent
unnecessary updates suppressing initial setting of associated pin to match.

Explicitly setting pin associated with active button selection via initval at initialisation corrects this.

Patch is against 2.8 but the code is the same 2.6 - 2.8

regards

>From b8330d1f03a4ffd49140d306806da98860c64409 Mon Sep 17 00:00:00 2001
From: Mick <[email protected]>
Date: Tue, 20 Jan 2015 10:24:30 +0000
Subject: [PATCH] Bug in radio button pyvcp_widgets

initval field setting the correct widget to active at initialisation, but changes to prevent
unnecessary updates supressing initial setting of associated pin to match.

Explicitly setting pin associated with active button selection via initval at initialisation corrects this.

Signed-off-by: Mick Grant <[email protected]>
---
 lib/python/pyvcp_widgets.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/python/pyvcp_widgets.py b/lib/python/pyvcp_widgets.py
index c0dbeb4..a9d5b1f 100644
--- a/lib/python/pyvcp_widgets.py
+++ b/lib/python/pyvcp_widgets.py
@@ -614,7 +614,7 @@ class pyvcp_radiobutton(Frame):
             n+=1
 
         self.selected = initval
-
+        pycomp[self.halpins[initval]]=1 
 
 ## ArcEye - FIXED - only update the pins if changed  ##
     def update(self,pycomp):
-- 
1.7.10.4

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to