From c97789541205aa4a725336e56e903e964c3c9957 Mon Sep 17 00:00:00 2001
From: jean-pierre charras <jp.charras@wanadoo.fr>
Date: Tue, 4 Jun 2019 10:55:14 +0200
Subject: [PATCH] Pl_editor: avoid flickering of the Properties Frame when
 moving an item.

---
 pagelayout_editor/tools/pl_editor_control.cpp | 6 ++++++
 pagelayout_editor/tools/pl_editor_control.h   | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/pagelayout_editor/tools/pl_editor_control.cpp b/pagelayout_editor/tools/pl_editor_control.cpp
index 1b76cc8987..daa8de2637 100644
--- a/pagelayout_editor/tools/pl_editor_control.cpp
+++ b/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;
 }
 
diff --git a/pagelayout_editor/tools/pl_editor_control.h b/pagelayout_editor/tools/pl_editor_control.h
index 048e500999..22dae925f3 100644
--- a/pagelayout_editor/tools/pl_editor_control.h
+++ b/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: