From fbe9e215ee3475a8917dcdf63e826cb54ee99824 Mon Sep 17 00:00:00 2001 From: micio Date: Sun, 5 Feb 2012 00:20:40 +0000 Subject: [PATCH] ide/Debuggers/Gdb_MI2 : fixed explorer editfield handling git-svn-id: svn://ultimatepp.org/upp/trunk@4548 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Debuggers/Gdb_MI2.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/uppsrc/ide/Debuggers/Gdb_MI2.cpp b/uppsrc/ide/Debuggers/Gdb_MI2.cpp index 37457dbf5..bbb10bdaf 100644 --- a/uppsrc/ide/Debuggers/Gdb_MI2.cpp +++ b/uppsrc/ide/Debuggers/Gdb_MI2.cpp @@ -1117,6 +1117,11 @@ bool Gdb_MI2::Key(dword key, int count) f->Key(key, count); return true; } + if(key == K_ENTER && explorerExprEdit.HasFocus()) + { + onExploreExpr(); + return true; + } return Ctrl::Key(key, count); } @@ -1245,7 +1250,12 @@ void Gdb_MI2::doExplore(String const &expr, String var, bool isChild, bool appen { MIValue v = MICmd("var-create - @ \"" + expr + "\""); if(v.IsEmpty() || v.IsError()) + { + explorer.Clear(); + explorerChildVars.Clear(); + explorer.Add(expr, ""); return; + } var = v["name"]; } else @@ -1330,6 +1340,7 @@ void Gdb_MI2::onExploreExpr(ArrayCtrl *what) // we use the expression editbox expr = ~explorerExprEdit; } + else { // otherwise, we use the expression from sending ArrayCtrl int line = what->GetCursor();