Hi. On Mon, Sep 5, 2011 at 2:23 AM, Octavio Alvarez <[email protected]> wrote: > On Sat, 03 Sep 2011 13:18:20 -0700, Einar Rünkaru <[email protected]> wrote: >>> >>> This requires a precise calculation in ReframeRT to stretch the >>> video sources to resync them. 4 digits are not enough. >>> >>> Therefore I propose the following patch. >>> >> >> Why minor fix in one plugin requires change in gui framework? > > During construction, textbox is initialized with the default value passed by > the TumbleTextBox constructor. > > I could simply override that by doing this: > > $ git diff > diff --git a/plugins/reframert/reframert.C b/plugins/reframert/reframert.C > index dd5075a..009b362 100644 > --- a/plugins/reframert/reframert.C > +++ b/plugins/reframert/reframert.C > @@ -227,8 +227,10 @@ void ReframeRTWindow::create_objects() > this, > x, > y); > + scale->set_precision(8); > scale->create_objects(); > scale->set_increment(0.1); > + scale->update((float)plugin->config.scale); > y += 30; > add_subwindow(stretch = new ReframeRTStretch(plugin, > this,
This patch is better - all change for one plugin remains in plugin. But not nice anyway. > > ... but that would mean the textbox value being initialized uselessly twice! > Once in create_objects() and once again in the ReframeRT initalization > override by me. > > I don't know the code enough to go deeper and find out the reasons for > having "create_objects" out of the constructor. You found another bug in cinelerra - bctextbox.C has bug(s) in honouring requested precision. I found solution for these problems and I shall use part of your patch to change the precision in ReframeRT. Another patch will be for guicast to properly pass through requested precision and use it. Thank you for your patch. Einar _______________________________________________ Cinelerra mailing list [email protected] https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
