octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #44776] [Qt] Restore window button does not tr


From: Michael Goffioul
Subject: [Octave-bug-tracker] [bug #44776] [Qt] Restore window button does not trigger a repaint event for its content
Date: Fri, 10 Apr 2015 00:29:47 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36

Follow-up Comment #9, bug #44776 (project octave):

The condition on the signal is because the method
Figure::updateBoundingBoxHelper is used for 2 different purpose, though very
similar: updating the outer and inner bounding box of the figure object. In
only one case, we want(ed) to force a figure redraw, but only after the
execution figure::properties::set_boundingbox, as the latter can have a bunch
of side-effects (e.g. execution of resizefcn callback) that you need to take
into account. I could have used 2 different functions,
updateInnerBoundingBoxHelper and updateOuterBoundingBoxHelper, but this didn't
seem worth it, as most of the would have been identical, except for emitting
the signal.

Also maybe you didn't realize, but Figure::updateBoundingBoxHelper is static,
so there is no "this" context and you can't simply do "emit asyncUpdate()".
The code doesn't emit a signal for another object, the figure object delegates
the emit of its own signal to one of its static method, because the signal
will have to be emitted from the octave thread, by queueing the static method
with gh_manager::post_function. This is basically an alternative to queueing a
bound-method. Using C++11 lambda expression would probably make the code more
elegant.

There is a gh_manager::post_set method to queue property changes, but this use
case was different ("boundingbox" is not a figure property).


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44776>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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