Pl_editor: avoid flickering of the Properties Frame when moving an item.

This commit is contained in:
jean-pierre charras 2019-06-04 10:55:14 +02:00
parent 34ccd0f004
commit c977895412
2 changed files with 10 additions and 0 deletions

View File

@ -151,6 +151,9 @@ int PL_EDITOR_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
PL_SELECTION_TOOL* selTool = m_toolMgr->GetTool<PL_SELECTION_TOOL>();
SELECTION& selection = selTool->GetSelection();
// The Properties frame will be updated. Avoid flicker during update:
m_frame->GetPropertiesFrame()->Freeze();
if( selection.GetSize() == 1 )
{
EDA_ITEM* item = (EDA_ITEM*) selection.Front();
@ -170,6 +173,9 @@ int PL_EDITOR_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
m_frame->GetPropertiesFrame()->CopyPrmsFromGeneralToPanel();
// The Properties frame is updated. Reenable it:
m_frame->GetPropertiesFrame()->Thaw();
return 0;
}

View File

@ -62,6 +62,10 @@ public:
int ToggleBackgroundColor( const TOOL_EVENT& aEvent );
/**
* Update the message panel *and* the Properties frame, after change
* (selection, move, edit ...) of a wks item
*/
int UpdateMessagePanel( const TOOL_EVENT& aEvent );
private: