Kaydet (Commit) e0fd364a authored tarafından Henry Castro's avatar Henry Castro Kaydeden (comit) Miklos Vajna

sc tiled editing: Limit the mouse events only to the document size.

From some reason, when clicking outside of the area visible in the
gtktiledviewer, the events starts being misplaced.

We need to revert & fix later when we will be able to extend the
document size in a convenient way.

Change-Id: I210705c9f8909598d8d47c15c14c06f96bfc4caa
üst 0e3fc4ae
...@@ -2426,7 +2426,11 @@ void ScGridWindow::LogicMouseButtonDown(const MouseEvent& rMouseEvent) ...@@ -2426,7 +2426,11 @@ void ScGridWindow::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
(void)rDoc; (void)rDoc;
assert(rDoc.GetDrawLayer()->isTiledRendering()); assert(rDoc.GetDrawLayer()->isTiledRendering());
MouseButtonDown(rMouseEvent); // Don't allow events outside of our viewport size.
// FIXME this will likely cause trouble when we allow extending the
// document size; but for now this is necessary to workaround a problem
if ( rMouseEvent.GetPosPixel().X() < GetOutputSizePixel().Width() && rMouseEvent.GetPosPixel().Y() < GetOutputSizePixel().Height())
MouseButtonDown(rMouseEvent);
} }
void ScGridWindow::LogicMouseButtonUp(const MouseEvent& rMouseEvent) void ScGridWindow::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment