summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-12-12 19:01:25 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-12-12 19:01:25 +0300
commit73935f2710e73be9d992527cf323122728792d05 (patch)
tree76ad1370c1c7f1fb3f6d9128200279ea5dcb3090
parentd4ee5175a2997e313783a416c91dc3d27d4412bb (diff)
minor code cleaning
-rw-r--r--plugins/NewStory/src/history_control.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 7ec860c3c8..600f0a9c14 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -599,9 +599,9 @@ int NewstoryListData::PaintItem(HDC hdc, int index, int top, int width)
RECT rc;
SetRect(&rc, 0, top, width, top + height);
- HBRUSH hbr;
- hbr = CreateSolidBrush(clBack);
+ HBRUSH hbr = CreateSolidBrush(clBack);
FillRect(hdc, &rc, hbr);
+ DeleteObject(hbr);
SetTextColor(hdc, clText);
SetBkMode(hdc, TRANSPARENT);
@@ -613,8 +613,6 @@ int NewstoryListData::PaintItem(HDC hdc, int index, int top, int width)
MTextDisplay(hdc, pos, sz, item->data);
SelectObject(hdc, hfnt);
- DeleteObject(hbr);
-
HPEN hpn = (HPEN)SelectObject(hdc, CreatePen(PS_SOLID, 1, clLine));
MoveToEx(hdc, rc.left, rc.bottom - 1, 0);
LineTo(hdc, rc.right, rc.bottom - 1);