mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-14 14:41:11 +02:00
ToolBar.cpp: remove excessive drawing on reset (as well as other resizing/positioning functions.)
Was causing an issue with the DeviceToolBar (discussed in bug 11,) but this change will speed up redraw of other toolbars as well.
This commit is contained in:
@@ -713,8 +713,6 @@ void DeviceToolBar::FillInputChannels()
|
|||||||
}
|
}
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
mInputChannels->Enable(false);
|
mInputChannels->Enable(false);
|
||||||
|
|
||||||
Layout();
|
|
||||||
}
|
}
|
||||||
void DeviceToolBar::SetDevices(DeviceSourceMap *in, DeviceSourceMap *out)
|
void DeviceToolBar::SetDevices(DeviceSourceMap *in, DeviceSourceMap *out)
|
||||||
{
|
{
|
||||||
|
@@ -254,9 +254,8 @@ void ToolBar::ReCreateButtons()
|
|||||||
mSpacer = ms->Add( RWIDTH, 1 );
|
mSpacer = ms->Add( RWIDTH, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the sizer and do initial layout
|
// Set the sizer
|
||||||
SetSizerAndFit( ms );
|
SetSizerAndFit( ms );
|
||||||
Layout();
|
|
||||||
|
|
||||||
// Recalculate the height to be a multiple of toolbarSingle
|
// Recalculate the height to be a multiple of toolbarSingle
|
||||||
const int tbs = toolbarSingle + toolbarGap;
|
const int tbs = toolbarSingle + toolbarGap;
|
||||||
|
@@ -244,9 +244,6 @@ void ToolDock::LayoutToolBars()
|
|||||||
ct->SetPosition( wxPoint( cpos.x, cpos.y ) );
|
ct->SetPosition( wxPoint( cpos.x, cpos.y ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resize/position elements for toolbars that change (like device toolbar)
|
|
||||||
ct->Layout();
|
|
||||||
|
|
||||||
// Remember for next iteration
|
// Remember for next iteration
|
||||||
lt = ct;
|
lt = ct;
|
||||||
lpos = cpos;
|
lpos = cpos;
|
||||||
|
Reference in New Issue
Block a user