lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master cfbaa7f: Improve upon the immediately-precedi


From: Greg Chicares
Subject: [lmi-commits] [lmi] master cfbaa7f: Improve upon the immediately-preceding commit
Date: Sat, 28 Jan 2017 23:48:41 +0000 (UTC)

branch: master
commit cfbaa7fb23634cf512fa26d00376eb8815348db5
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Improve upon the immediately-preceding commit
    
    See:
      http://lists.nongnu.org/archive/html/lmi/2017-01/msg00140.html
---
 input_sequence_entry.cpp |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
index e409b61..92936ef 100644
--- a/input_sequence_entry.cpp
+++ b/input_sequence_entry.cpp
@@ -413,6 +413,12 @@ void InputSequenceEditor::sequence(InputSequence const& s)
 {
     LayoutOnceGuard guard(this);
 
+    // The layout was frozen initially, but it can be thawed as soon as this
+    // function returns because we will finally be able to determine our real
+    // size. Notice that thaw will only happen on function exit, in the dtor
+    // of the layout guard defined just above.
+    --layout_freeze_count_;
+
     while(0 < rows_count_)
         {
         remove_row(0);
@@ -425,7 +431,7 @@ void InputSequenceEditor::sequence(InputSequence const& s)
         {
         // have single row (initial state)
         add_row();
-        goto done;
+        return;
         }
 
     LMI_ASSERT(0 == intervals.front().begin_duration);
@@ -485,11 +491,6 @@ void InputSequenceEditor::sequence(InputSequence const& s)
     value_field_ctrl(0).SetFocus();
 
     update_diagnostics();
-
-  done:
-    // The layout was frozen initially, thaw it now, just once, as we can
-    // determine our really final size.
-    --layout_freeze_count_;
 }
 
 std::string InputSequenceEditor::sequence_string()



reply via email to

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