Reduce the scope of some local variables
This commit is contained in:
@@ -1613,11 +1613,11 @@ void MyFrame::OnUpdateFormat(wxUpdateUIEvent& event)
|
||||
void MyFrame::OnUpdateImage(wxUpdateUIEvent& event)
|
||||
{
|
||||
wxRichTextRange range;
|
||||
wxRichTextObject *obj;
|
||||
|
||||
range = m_richTextCtrl->GetSelectionRange();
|
||||
if (range.ToInternal().GetLength() == 1)
|
||||
{
|
||||
wxRichTextObject *obj;
|
||||
obj = m_richTextCtrl->GetFocusObject()->GetLeafObjectAtPosition(range.GetStart());
|
||||
if (obj && obj->IsKindOf(CLASSINFO(wxRichTextImage)))
|
||||
{
|
||||
|
@@ -343,13 +343,12 @@ public:
|
||||
wxSize clientSize = GetClientSize();
|
||||
|
||||
wxCoord y = 0;
|
||||
wxCoord x = 0;
|
||||
for ( size_t row = rowFirst; row < rowLast; row++ )
|
||||
{
|
||||
wxCoord rowHeight = OnGetRowHeight(row);
|
||||
dc.DrawLine(0, y, clientSize.GetWidth(), y);
|
||||
|
||||
x = 0;
|
||||
wxCoord x = 0;
|
||||
for ( size_t col = columnFirst; col < columnLast; col++ )
|
||||
{
|
||||
wxCoord colWidth = OnGetColumnWidth(col);
|
||||
|
Reference in New Issue
Block a user