Kaydet (Commit) 0af0211b authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

tdf#91484 fix macro editor - Invalidate in paint

Change-Id: I787da9a665e54caea229def185076b29c00fd11e
üst 09e5c166
......@@ -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;
......
......@@ -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 )
......
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