mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #274 from Kingcom/Scrollbars
Fix column width in debugger
This commit is contained in:
commit
f7192b82b1
|
@ -59,7 +59,7 @@ void GenericListView::resizeColumns(int totalWidth)
|
||||||
|
|
||||||
void GenericListView::sizeEvent(wxSizeEvent& evt)
|
void GenericListView::sizeEvent(wxSizeEvent& evt)
|
||||||
{
|
{
|
||||||
resizeColumns(evt.GetSize().x);
|
resizeColumns(GetClientSize().x);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericListView::keydownEvent(wxKeyEvent& evt)
|
void GenericListView::keydownEvent(wxKeyEvent& evt)
|
||||||
|
@ -87,7 +87,20 @@ void GenericListView::keydownEvent(wxKeyEvent& evt)
|
||||||
void GenericListView::update()
|
void GenericListView::update()
|
||||||
{
|
{
|
||||||
int newRows = getRowCount();
|
int newRows = getRowCount();
|
||||||
|
int oldRows = GetItemCount();
|
||||||
|
|
||||||
SetItemCount(newRows);
|
SetItemCount(newRows);
|
||||||
|
|
||||||
|
if (newRows != oldRows)
|
||||||
|
{
|
||||||
|
resizeColumns(GetClientSize().x);
|
||||||
|
|
||||||
|
// wx adds the horizontal scrollbar based on the old column width,
|
||||||
|
// which changes the client width. Simply resizing the columns won't
|
||||||
|
// make the scrollbar go away, so let's make it recalculate if it needs it
|
||||||
|
SetItemCount(newRows);
|
||||||
|
}
|
||||||
|
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -598,4 +611,4 @@ void ThreadList::onDoubleClick(int itemIndex, const wxPoint& point)
|
||||||
postEvent(debEVT_GOTOINDISASM,thread.data.entry);
|
postEvent(debEVT_GOTOINDISASM,thread.data.entry);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue