summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-29 18:20:42 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-29 18:25:09 +0900
commit0af0211b0f81f91727c81df909c0b41cedc4b088 (patch)
treebe7d9b201775dbbda25dd3120aaa488a507547be
parent09e5c16656f04728c86d59d8eaf9e75957b4f62a (diff)
tdf#91484 fix macro editor - Invalidate in paint
Change-Id: I787da9a665e54caea229def185076b29c00fd11e
-rw-r--r--basctl/source/basicide/baside2.hxx1
-rw-r--r--basctl/source/basicide/baside2b.cxx25
2 files changed, 25 insertions, 1 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index f3bbe8bd3f2d..06390f2accca 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -179,6 +179,7 @@ private:
protected:
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE;
BreakPoint* FindBreakPoint( const Point& rMousePos );
+ void ShowMarker(vcl::RenderContext& rRenderContext);
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE;
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 658b9b9c1058..e931552b3578 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1402,7 +1402,30 @@ void BreakPointWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle
rRenderContext.DrawImage(Point(0, nY) + aBmpOff, aBrk[rBrk.bEnabled]);
}
- Invalidate();
+ ShowMarker(rRenderContext);
+}
+
+void BreakPointWindow::ShowMarker(vcl::RenderContext& rRenderContext)
+{
+ if (nMarkerPos == NoMarker)
+ return;
+
+ Size const aOutSz = GetOutputSize();
+ long const nLineHeight = GetTextHeight();
+
+ Image aMarker = GetImage(bErrorMarker ? IMGID_ERRORMARKER : IMGID_STEPMARKER);
+
+ Size aMarkerSz(aMarker.GetSizePixel());
+ aMarkerSz = rRenderContext.PixelToLogic(aMarkerSz);
+ Point aMarkerOff(0, 0);
+ aMarkerOff.X() = (aOutSz.Width() - aMarkerSz.Width()) / 2;
+ aMarkerOff.Y() = (nLineHeight - aMarkerSz.Height()) / 2;
+
+ sal_uLong nY = nMarkerPos * nLineHeight - nCurYOffset;
+ Point aPos(0, nY);
+ aPos += aMarkerOff;
+
+ rRenderContext.DrawImage(aPos, aMarker);
}
void BreakPointWindow::DoScroll( long nHorzScroll, long nVertScroll )