Mark document dirty after drag; don't wait for point editor deactivation.

Fixes https://gitlab.com/kicad/code/kicad/issues/7285
This commit is contained in:
Jeff Young 2021-01-26 17:46:10 +00:00
parent 1598e870b6
commit f3047829e5
1 changed files with 10 additions and 3 deletions

View File

@ -319,13 +319,17 @@ int EE_POINT_EDITOR::Main( const TOOL_EVENT& aEvent )
updateParentItem(); updateParentItem();
updatePoints(); updatePoints();
} }
else if( inDrag && evt->IsMouseUp( BUT_LEFT ) ) else if( inDrag && evt->IsMouseUp( BUT_LEFT ) )
{ {
if( modified )
{
m_frame->OnModify();
modified = false;
}
controls->SetAutoPan( false ); controls->SetAutoPan( false );
inDrag = false; inDrag = false;
} }
else if( evt->IsCancelInteractive() || evt->IsActivate() ) else if( evt->IsCancelInteractive() || evt->IsActivate() )
{ {
if( inDrag ) // Restore the last change if( inDrag ) // Restore the last change
@ -336,14 +340,17 @@ int EE_POINT_EDITOR::Main( const TOOL_EVENT& aEvent )
break; break;
} }
else if( evt->IsCancelInteractive() ) else if( evt->IsCancelInteractive() )
{
break; break;
}
if( evt->IsActivate() ) if( evt->IsActivate() )
break; break;
} }
else else
{
evt->SetPassEvent(); evt->SetPassEvent();
}
controls->SetAutoPan( inDrag ); controls->SetAutoPan( inDrag );
controls->CaptureCursor( inDrag ); controls->CaptureCursor( inDrag );