[nemiver/monitor-variable: 3/5] Update sub-variables of the one we are looking at



commit e430d634b89e63477b0a82e95bf84f63c93024de
Author: Dodji Seketeli <dodji seketeli org>
Date:   Mon Mar 26 18:03:34 2012 +0200

    Update sub-variables of the one we are looking at
    
    	* src/dbgengine/nmv-dbg-common.cc (VarChange::apply_to_variable):
    	Don't forget to apply changes to the sub-variables of the one we
    	are looking at.

 src/dbgengine/nmv-dbg-common.cc |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/dbgengine/nmv-dbg-common.cc b/src/dbgengine/nmv-dbg-common.cc
index c440a8d..3329d2e 100644
--- a/src/dbgengine/nmv-dbg-common.cc
+++ b/src/dbgengine/nmv-dbg-common.cc
@@ -162,15 +162,13 @@ VarChange::apply_to_variable (IDebugger::VariableSafePtr a_var,
     IDebugger::VariableSafePtr v;
     if (*a_var == *variable ()) {
         applied_to = a_var;
-        update_debugger_variable (*applied_to, *variable ());
     } else {
         // variable must be a descendant of a_var.
         v = a_var->get_descendant (variable ()->internal_name ());
         THROW_IF_FAIL (v);
         applied_to = v;
-        if (variable ()->name ().empty () && !v->name ().empty ())
-            variable ()->name (v->name ());
     }
+    update_debugger_variable (*applied_to, *variable ());
 
     a_changed_vars.push_back (applied_to);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]