[nemiver] Fix offscreen -> onscreen locals rendering
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver] Fix offscreen -> onscreen locals rendering
- Date: Fri, 23 Dec 2011 16:18:25 +0000 (UTC)
commit 54932433d6a65f5bf03441583f33dd32b60d678a
Author: Dodji Seketeli <dodji seketeli org>
Date: Fri Dec 23 11:39:01 2011 +0100
Fix offscreen -> onscreen locals rendering
* src/persp/dbgperspective/nmv-local-vars-inspector.cc
(is_local_variables_subtree_empty, inspector_is_empty): New
functions.
(finish_handling_debugger_stopped_event): Add logging. Use the
new inspector_is_empty. Make sure to save proper state in all
cases.
.../dbgperspective/nmv-local-vars-inspector.cc | 28 +++++++++++++++++---
1 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/src/persp/dbgperspective/nmv-local-vars-inspector.cc b/src/persp/dbgperspective/nmv-local-vars-inspector.cc
index e1c222c..bc124ba 100644
--- a/src/persp/dbgperspective/nmv-local-vars-inspector.cc
+++ b/src/persp/dbgperspective/nmv-local-vars-inspector.cc
@@ -173,7 +173,25 @@ public:
}
bool
- get_local_variables_row_iterator (Gtk::TreeModel::iterator &a_it)
+ is_local_variables_subtree_empty () const
+ {
+ LOG_FUNCTION_SCOPE_NORMAL_DD;
+
+ Gtk::TreeModel::iterator it;
+ if (!get_local_variables_row_iterator (it))
+ return true;
+ return it->children ().empty ();
+ }
+
+ bool
+ inspector_is_empty () const
+ {
+ return (is_function_arguments_subtree_empty ()
+ && is_local_variables_subtree_empty ());
+ }
+
+ bool
+ get_local_variables_row_iterator (Gtk::TreeModel::iterator &a_it) const
{
if (!local_variables_row_ref) {
LOG_DD ("there is no variables row iter yet");
@@ -487,12 +505,14 @@ public:
THROW_IF_FAIL (tree_store);
+ LOG_DD ("a_has_frame: " << a_has_frame);
+
if (!a_has_frame)
return;
saved_frame = a_frame;
- if (is_new_frame) {
+ if (is_new_frame || inspector_is_empty ()) {
LOG_DD ("init tree view");
re_init_tree_view ();
LOG_DD ("list local variables");
@@ -708,14 +728,14 @@ public:
THROW_IF_FAIL (debugger);
is_new_frame = (saved_frame != a_frame);
saved_frame = a_frame;
+ saved_reason = a_reason;
+ saved_has_frame = a_has_frame;
if (should_process_now ()) {
finish_handling_debugger_stopped_event (a_reason,
a_has_frame,
a_frame);
} else {
- saved_reason = a_reason;
- saved_has_frame = a_has_frame;
is_up2date = false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]