lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] (no subject)


From: Greg Chicares
Subject: [lmi-commits] (no subject)
Date: Sat, 28 May 2016 01:28:06 +0000 (UTC)

branch: master
commit d595c3333c507d9f6948defe3ab5ae81ab4c2f95
Author: Vadim Zeitlin <address@hidden>
Date:   Fri Apr 1 23:45:11 2016 +0200

    Initialize input sequence editor controls faster
    
    Lock the window for updates before appending several strings to
    wxChoice or wxComboBox.
---
 input_sequence_entry.cpp |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
index cf12dd3..737384d 100644
--- a/input_sequence_entry.cpp
+++ b/input_sequence_entry.cpp
@@ -49,6 +49,7 @@
 #include <wx/spinctrl.h>
 #include <wx/stattext.h>
 #include <wx/textctrl.h>
+#include <wx/wupdlock.h>
 #include <wx/valtext.h>
 
 #include <algorithm>              // std::copy()
@@ -92,10 +93,13 @@ DurationModeChoice::DurationModeChoice(wxWindow* parent)
 {
     Create(parent, wxID_ANY);
 
+    {
+    wxWindowUpdateLocker lock(this);
     for(unsigned int i = 0; i < duration_mode_choices; ++i)
         {
         Append(duration_mode_choice_values[i].label);
         }
+    }
 
     // "maturity" is the default
     value(e_maturity);
@@ -587,7 +591,10 @@ void InputSequenceEditor::insert_row(int new_row)
 
         wxArrayString kw;
         std::copy(keywords_.begin(), keywords_.end(), std::back_inserter(kw));
+        {
+        wxWindowUpdateLocker lock_combo(combo);
         combo->Append(kw);
+        }
 
         if(keywords_only_)
             {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]