In the debugger window, when you click on a cross on the left margin to
fold or unfold a block of code, we also set or clear a breakpoint on
that line. That's clearly not the way it's supposed to work - should
only set/clear breakpoints when you click on the line number or the
margin that displays the red breakpoint symbol.
Attached is a patch to fix that.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
commit 22e7dee866214542f11e87cb61baf3e7f2e709e7
Author: Heikki Linnakangas <[email protected]>
Date: Mon May 7 14:50:27 2012 +0300
Don't set/clear breakpoint when code is folded/unfolded.
diff --git a/pgadmin/debugger/ctlCodeWindow.cpp b/pgadmin/debugger/ctlCodeWindow.cpp
index c6098f6..c793e0c 100644
--- a/pgadmin/debugger/ctlCodeWindow.cpp
+++ b/pgadmin/debugger/ctlCodeWindow.cpp
@@ -279,8 +279,14 @@ void ctlCodeWindow::OnClose(wxCloseEvent &event)
void ctlCodeWindow::OnMarginClick( wxStyledTextEvent &event )
{
- int lineNumber = m_view->LineFromPosition(event.GetPosition());
+ int lineNumber;
+ // Check that the user clicked on the line number or breakpoint margin.
+ // We don't want to set a breakpoint when the user folds/unfolds code.
+ if (!(event.GetMargin() == 0 || event.GetMargin() == 1))
+ return;
+
+ lineNumber = m_view->LineFromPosition(event.GetPosition());
if (!lineNumber)
return;
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers