Browse Source

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

pull/15/head
jean-pierre charras 7 years ago
parent
commit
c977895412
  1. 6
      pagelayout_editor/tools/pl_editor_control.cpp
  2. 4
      pagelayout_editor/tools/pl_editor_control.h

6
pagelayout_editor/tools/pl_editor_control.cpp

@ -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;
}

4
pagelayout_editor/tools/pl_editor_control.h

@ -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:

Loading…
Cancel
Save