summaryrefslogtreecommitdiff
path: root/wx+/grid.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:22:55 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:22:55 +0200
commitc4182431ac7d9d306fdd2267e082fa4cec6fec2c (patch)
tree865cca543c062b7af2586f85cee19f9af4e7614d /wx+/grid.cpp
parent5.11 (diff)
downloadFreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.tar.gz
FreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.tar.bz2
FreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.zip
5.12
Diffstat (limited to 'wx+/grid.cpp')
-rw-r--r--wx+/grid.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/wx+/grid.cpp b/wx+/grid.cpp
index 5c9d3dc8..f6d0e6b8 100644
--- a/wx+/grid.cpp
+++ b/wx+/grid.cpp
@@ -328,6 +328,8 @@ public:
Connect(wxEVT_CHAR, wxKeyEventHandler(SubWindow::onChar ), nullptr, this);
Connect(wxEVT_KEY_UP, wxKeyEventHandler(SubWindow::onKeyUp ), nullptr, this);
Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(SubWindow::onKeyDown), nullptr, this);
+
+ assert(GetClientAreaOrigin() == wxPoint()); //generally assumed when dealing with coordinates below
}
Grid& refParent() { return parent_; }
@@ -483,6 +485,7 @@ public:
wxRect getRowLabelArea(ptrdiff_t row) const
{
+ assert(GetClientAreaOrigin() == wxPoint());
return wxRect(wxPoint(0, rowHeight * row),
wxSize(GetClientSize().GetWidth(), rowHeight));
}
@@ -1304,9 +1307,9 @@ private:
}
~MouseSelection() { if (wnd_.HasCapture()) wnd_.ReleaseMouse(); }
- size_t getStartRow () const { return rowStart_; }
- size_t getComponentPos () const { return compPos_; }
- size_t getCurrentRow () const { return rowCurrent_; }
+ size_t getStartRow () const { return rowStart_; }
+ size_t getComponentPos () const { return compPos_; }
+ size_t getCurrentRow () const { return rowCurrent_; }
bool isPositiveSelect() const { return positiveSelect_; } //are we selecting or unselecting?
void evalMousePos()
@@ -1322,6 +1325,7 @@ private:
wxMouseState mouseState = wxGetMouseState();
const wxPoint clientPos = wnd_.ScreenToClient(wxPoint(mouseState.GetX(), mouseState.GetY()));
const wxSize clientSize = wnd_.GetClientSize();
+ assert(wnd_.GetClientAreaOrigin() == wxPoint());
//scroll while dragging mouse
const int overlapPixY = clientPos.y < 0 ? clientPos.y :
bgstack15