summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToma┼ż Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-29 18:20:42 +0900
committerJan Holesovsky <kendy@collabora.com>2015-05-29 20:16:54 +0200
commit9b1860465ee6d5d2ab91d013ee854ff8874fe9eb (patch)
treef075715d972b16e1b11f4bd0f31a0e967ced8dc9
parent6d0696980a39b5a0618221c0120ecead4846ff05 (diff)
tdf#91484 fix macro editor - Invalidate in paint
Change-Id: I787da9a665e54caea229def185076b29c00fd11e Signed-off-by: Jan Holesovsky <kendy@collabora.com>
-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 2c98fdea94d5..68592f41a180 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 )