From 12c2090143b004875fd95da063cd73c36cb84a14 Mon Sep 17 00:00:00 2001 From: unodgs Date: Mon, 15 Feb 2010 20:42:09 +0000 Subject: [PATCH] Fixed stupid braces bug, left double is working again on the popup git-svn-id: svn://ultimatepp.org/upp/trunk@2081 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/GridCtrl/GridCtrl.cpp | 10 ++++++---- uppsrc/GridCtrl/GridDisplay.h | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/uppsrc/GridCtrl/GridCtrl.cpp b/uppsrc/GridCtrl/GridCtrl.cpp index 0e39a147b..ec1ac717a 100644 --- a/uppsrc/GridCtrl/GridCtrl.cpp +++ b/uppsrc/GridCtrl/GridCtrl.cpp @@ -1988,7 +1988,10 @@ void GridCtrl::SyncPopup() int lines = popup.gd->GetLinesCount(cx - margin - 2, WString(val), StdFont(), true); int cy = max(lines * Draw::GetStdFontCy() + popup.gd->tm + popup.gd->bm + 2, vi.nsize + 1); if(fr && r == 0) - y++; cy--; + { + y++; + cy--; + } popup.PopUp(this, x, y, cx, cy); if(!close) popup.Refresh(); @@ -5435,7 +5438,7 @@ void GridCtrl::MouseLeave() UpdateHighlighting(GS_BORDER, Point(0, 0)); oldSplitCol = -1; oldSplitRow = -1; - popup.Close(); + //popup.Close(); } void GridCtrl::MouseWheel(Point p, int zdelta, dword keyflags) @@ -6283,8 +6286,7 @@ bool GridCtrl::StartEdit(bool mouse) if(!valid_cursor || !IsRowEditable()) return false; - ctrls = true; - + //ctrls = true; WhenStartEdit(); SetCtrlsData(); diff --git a/uppsrc/GridCtrl/GridDisplay.h b/uppsrc/GridCtrl/GridDisplay.h index 032084b14..62ff4c309 100644 --- a/uppsrc/GridCtrl/GridDisplay.h +++ b/uppsrc/GridCtrl/GridDisplay.h @@ -79,6 +79,8 @@ class GridDisplay void SetVertMargin(int top = 0, int bottom = 0) { tm = top; bm = bottom; } void SetTheme(int th = 6) { theme = th; } int GetThemeCount() { return 7; } + bool IsFixedRow() { return row < 0; } + bool IsFixedCol() { return col < 0; } WString GetStdConvertedValue(const Value &v) const; int GetLinesCount(int cx, const wchar* s, const Font& font, bool wrap);