summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorweigao <weigao@multicorewareinc.com>2014-06-16 23:33:03 -0700
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-06-17 07:43:58 +0200
commitaf5dfd8af2e92cbd511ae6ff840d4ea7f3f83ad5 (patch)
tree753b510ab623d8feb927afc795343ec8560b3feb /chart2
parenta96c575764a36399e459813d6204db3bfc0a08f3 (diff)
add move to default process
Change-Id: I8d562b3e2d1bb83a6e07ed089a3006a109beeece
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx19
1 files changed, 7 insertions, 12 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index c88980980802..7c3b8811fd88 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -357,24 +357,19 @@ void GL3DBarChart::moveToDefault()
glm::vec3 maTargetDirection = maDefaultCameraDirection;
maStepDirection = (maTargetDirection - maCameraDirection)/((float)mnStepsTotal);
- while((mnStep < mnStepsTotal) && mbBlockUserInput)
- {
- ++mnStep;
- maCameraPosition += maStep;
- mpCamera->setPosition(maCameraPosition);
- maCameraDirection += maStepDirection;
- mpCamera->setDirection(maCameraDirection);
- render();
- }
- maShapes.pop_back();
- mbBlockUserInput = false;
- mnStep = 0;
+ maTimer.SetTimeout(TIMEOUT);
+ maTimer.SetTimeoutHdl(LINK(this, GL3DBarChart, MoveToBar));
+ maTimer.Start();
}
void GL3DBarChart::clickedAt(const Point& rPos, sal_uInt16 nButtons)
{
if(mbBlockUserInput)
return;
+ if (nButtons == MOUSE_RIGHT)
+ {
+ moveToDefault();
+ }
if(nButtons != MOUSE_LEFT)
return;