Fix code when making scrollwindow bigger so that
the scroll bars will finally disappear. The
code forgot to scroll the window back to 0.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -83,6 +83,12 @@ void wxScrollHelperNative::DoAdjustScrollbar(GtkAdjustment *adj,
|
|||||||
{
|
{
|
||||||
if ( pixelsPerLine == 0 || winSize >= virtSize)
|
if ( pixelsPerLine == 0 || winSize >= virtSize)
|
||||||
{
|
{
|
||||||
|
if ( !wxIsNullDouble(adj->value) )
|
||||||
|
{
|
||||||
|
adj->value = 0.0;
|
||||||
|
g_signal_emit_by_name (adj, "value_changed");
|
||||||
|
}
|
||||||
|
|
||||||
adj->upper = 1.0;
|
adj->upper = 1.0;
|
||||||
adj->page_increment = 1.0;
|
adj->page_increment = 1.0;
|
||||||
adj->page_size = 1.0;
|
adj->page_size = 1.0;
|
||||||
@@ -105,18 +111,9 @@ void wxScrollHelperNative::DoAdjustScrollbar(GtkAdjustment *adj,
|
|||||||
if (adj->value < 0.0)
|
if (adj->value < 0.0)
|
||||||
adj->value = 0.0;
|
adj->value = 0.0;
|
||||||
|
|
||||||
if ( m_win->GetChildren().empty() )
|
|
||||||
{
|
|
||||||
// This is enough without child windows
|
|
||||||
*pos = (int)adj->value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// We need to actually scroll window
|
|
||||||
g_signal_emit_by_name (adj, "value_changed");
|
g_signal_emit_by_name (adj, "value_changed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
*lines = (int)(adj->upper + 0.5);
|
*lines = (int)(adj->upper + 0.5);
|
||||||
*linesPerPage = (int)(adj->page_increment + 0.5);
|
*linesPerPage = (int)(adj->page_increment + 0.5);
|
||||||
|
|||||||
Reference in New Issue
Block a user