mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #1338 from turtleli/breakpoint-windows-fix
debugger:windows: Fix vanishing breakpoints when scrollbar disappears
This commit is contained in:
commit
f4566acfa5
|
@ -31,6 +31,7 @@ GenericListView::GenericListView(wxWindow* parent, GenericListViewColumn* column
|
||||||
: wxListView(parent,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxLC_VIRTUAL|wxLC_REPORT|wxLC_SINGLE_SEL|wxNO_BORDER)
|
: wxListView(parent,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxLC_VIRTUAL|wxLC_REPORT|wxLC_SINGLE_SEL|wxNO_BORDER)
|
||||||
{
|
{
|
||||||
m_isInResizeColumn = false;
|
m_isInResizeColumn = false;
|
||||||
|
dontResizeColumnsInSizeEventHandler = false;
|
||||||
|
|
||||||
insertColumns(columns, columnCount);
|
insertColumns(columns, columnCount);
|
||||||
}
|
}
|
||||||
|
@ -72,7 +73,12 @@ void GenericListView::resizeColumns(int totalWidth)
|
||||||
|
|
||||||
void GenericListView::sizeEvent(wxSizeEvent& evt)
|
void GenericListView::sizeEvent(wxSizeEvent& evt)
|
||||||
{
|
{
|
||||||
|
// HACK: On Windows, it seems that if you resize the columns in the size
|
||||||
|
// event handler when the scrollbar disappears, the listview contents may
|
||||||
|
// decide to disappear as well. So let's avoid the resize for this case.
|
||||||
|
if (!dontResizeColumnsInSizeEventHandler)
|
||||||
resizeColumns(GetClientSize().x);
|
resizeColumns(GetClientSize().x);
|
||||||
|
dontResizeColumnsInSizeEventHandler = false;
|
||||||
evt.Skip();
|
evt.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +116,7 @@ void GenericListView::update()
|
||||||
// make the scrollbar go away, so let's make it recalculate if it needs it
|
// make the scrollbar go away, so let's make it recalculate if it needs it
|
||||||
SetItemCount(newRows);
|
SetItemCount(newRows);
|
||||||
}
|
}
|
||||||
|
dontResizeColumnsInSizeEventHandler = true;
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ private:
|
||||||
|
|
||||||
GenericListViewColumn* columns;
|
GenericListViewColumn* columns;
|
||||||
wxPoint clickPos;
|
wxPoint clickPos;
|
||||||
|
bool dontResizeColumnsInSizeEventHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BreakpointList: public GenericListView
|
class BreakpointList: public GenericListView
|
||||||
|
|
Loading…
Reference in New Issue