lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Not urgent: a plausible micro-optimization


From: Greg Chicares
Subject: Re: [lmi] Not urgent: a plausible micro-optimization
Date: Wed, 21 Feb 2018 22:14:40 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 2018-02-17 16:56, Vadim Zeitlin wrote:
[...]
>       https://github.com/vadz/lmi/pull/68


I have a question about one detail here:

+        wxDocMDIChildFrame const* c = dynamic_cast<wxDocMDIChildFrame*>(w);
         if(c)
             {
             IllustrationView* v = 
dynamic_cast<IllustrationView*>(c->GetView());
             if(v)
                 {
                 v->DisplaySelectedValuesAsHtml();
+
+                // Update the display immediately to display the new data as
+                // soon as possible, without waiting for the other views.
+                v->GetFrame()->Update();
                 }
             }

On the last added line, would
  c->Update();
do the same thing as
  v->GetFrame()->Update();
because 'c' is certainly the wxDocMDIChildFrame of 'v'?
Is it necessarily the one-and-only frame window of 'v'?

I've temporarily added this for testing:
+                LMI_ASSERT(v->GetFrame() == c);
                 v->GetFrame()->Update();
and I haven't found a way to make that assertion fail, but
I'd like to be sure I'm not missing some subtlety.



reply via email to

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