summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx')
-rw-r--r--drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx32
1 files changed, 22 insertions, 10 deletions
diff --git a/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx b/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx
index 53b6f877061b..0ed22120c6d6 100644
--- a/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx
+++ b/drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx
@@ -65,17 +65,21 @@ void BufferedDecompositionPrimitive2D::setBuffered2DDecomposition(Primitive2DCon
{
if (0 != maCallbackSeconds)
{
- if (rNew.empty())
+ if (maCallbackTimer.is())
{
- // no more decomposition, end callback
- maCallbackTimer.clear();
+ if (rNew.empty())
+ {
+ // no more decomposition, end callback
+ maCallbackTimer->stop();
+ maCallbackTimer.clear();
+ }
+ else
+ {
+ // decomposition changed, touch
+ maCallbackTimer->setRemainingTime(salhelper::TTimeValue(maCallbackSeconds, 0));
+ }
}
- else if (maCallbackTimer.is())
- {
- // decomposition changed, touch
- maCallbackTimer->setRemainingTime(salhelper::TTimeValue(maCallbackSeconds, 0));
- }
- else
+ else if (!rNew.empty())
{
// decomposition changed, start callback
maCallbackTimer.set(new LocalCallbackTimer(*this));
@@ -95,7 +99,15 @@ BufferedDecompositionPrimitive2D::BufferedDecompositionPrimitive2D()
{
}
-BufferedDecompositionPrimitive2D::~BufferedDecompositionPrimitive2D() {}
+BufferedDecompositionPrimitive2D::~BufferedDecompositionPrimitive2D()
+{
+ if (maCallbackTimer.is())
+ {
+ // no more decomposition, end callback
+ maCallbackTimer->stop();
+ maCallbackTimer.clear();
+ }
+}
void BufferedDecompositionPrimitive2D::get2DDecomposition(
Primitive2DDecompositionVisitor& rVisitor,