From e4e022f342b00af687f80cf0b07eb24f8805be37 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 22 Jul 2015 12:38:18 +0000 Subject: [PATCH] ide: Navigator scope dblclick #1068 git-svn-id: svn://ultimatepp.org/upp/trunk@8725 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Assist.h | 1 + uppsrc/ide/Browser/Base.cpp | 6 ++++-- uppsrc/ide/Navigator.cpp | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/uppsrc/ide/Assist.h b/uppsrc/ide/Assist.h index 4450f62eb..b1dff1fbb 100644 --- a/uppsrc/ide/Assist.h +++ b/uppsrc/ide/Assist.h @@ -90,6 +90,7 @@ struct Navigator { Vector GetNavLines(const NavItem& m); void Navigate(); + void ScopeDblClk(); void NavigatorClick(); void NavigatorEnter(); void SyncLines(); diff --git a/uppsrc/ide/Browser/Base.cpp b/uppsrc/ide/Browser/Base.cpp index 73a39cfc6..22bea721a 100644 --- a/uppsrc/ide/Browser/Base.cpp +++ b/uppsrc/ide/Browser/Base.cpp @@ -8,8 +8,10 @@ #define LDUMP(x) // DDUMP(x) -#ifndef _DEBUG -#define CLOG(x) // RLOG(x) +#ifdef _DEBUG +#define CLOG(x) +#else +#define CLOG(x) RLOG(x) #endif #define CPP_CODEBASE_VERSION 314159 diff --git a/uppsrc/ide/Navigator.cpp b/uppsrc/ide/Navigator.cpp index a98eb9de5..2456283ce 100644 --- a/uppsrc/ide/Navigator.cpp +++ b/uppsrc/ide/Navigator.cpp @@ -74,6 +74,7 @@ Navigator::Navigator() scope.AddColumn().SetDisplay(Single()); scope.NoWantFocus(); scope.WhenSel = THISBACK(Scope); + scope.WhenLeftDouble = THISBACK(ScopeDblClk); list.NoHeader(); list.AddRowNumColumn().SetDisplay(navidisplay); @@ -258,6 +259,19 @@ void Navigator::Navigate() navigating = false; } +void Navigator::ScopeDblClk() +{ + if(!scope.IsCursor()) + return; + String h = scope.GetKey(); + if((byte)*h == 0xff) + theide->GotoPos(h.Mid(1), 1); + else { + list.GoBegin(); + Navigate(); + } +} + void Navigator::NavigatorClick() { if(dlgmode)