mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-31 07:59:27 +02:00
Fix misbehavior of toolbars after click without drag on a grabber...
... only lately introduced at b3c8f5db3dc386989fb03506b6f2f032319929e1
This commit is contained in:
parent
2f178db700
commit
2d56c8ec32
@ -835,13 +835,8 @@ void ToolDock::OnGrabber( GrabberEvent & event )
|
||||
{
|
||||
// auto pos = event.GetPosition();
|
||||
if (!event.IsEscaping()) {
|
||||
ToolBar *t = mBars[ event.GetId() ];
|
||||
|
||||
// Pass it on to the manager since it isn't in the handling hierarchy
|
||||
mManager->ProcessEvent( event );
|
||||
|
||||
// We no longer have control
|
||||
mConfiguration.Remove( t );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1361,6 +1361,10 @@ void ToolManager::OnIndicatorCreate( wxWindowCreateEvent & event )
|
||||
|
||||
void ToolManager::UndockBar( wxPoint mp )
|
||||
{
|
||||
mPrevDock->Undock(mDragBar);
|
||||
mPrevSlot = mPrevDock->GetConfiguration().Find(mDragBar);
|
||||
mPrevDock->GetConfiguration().Remove(mDragBar);
|
||||
|
||||
#if defined(__WXMAC__)
|
||||
// Disable window animation
|
||||
wxSystemOptions::SetOption( wxMAC_WINDOW_PLAIN_TRANSITION, 1 );
|
||||
@ -1407,8 +1411,6 @@ void ToolManager::OnGrabber( GrabberEvent & event )
|
||||
if (mDragBar->IsDocked()) {
|
||||
mPrevDock = dynamic_cast<ToolDock*>(mDragBar->GetParent());
|
||||
wxASSERT(mPrevDock);
|
||||
mPrevSlot = mPrevDock->GetConfiguration().Find(mDragBar);
|
||||
mPrevDock->WrapConfiguration(mPrevConfiguration);
|
||||
}
|
||||
else
|
||||
mPrevPosition = mDragBar->GetParent()->GetPosition();
|
||||
|
Loading…
x
Reference in New Issue
Block a user