That's because in Reinvest::showWidgets the QTimer::singleShot(1, shareEdit, SLOT(show())); is used instead of shareEdit->show(). The same is true for each action where a delayed show is performed in showWidgets() (for exaple 'Add shares'). The delayed show()/hide() should be replaced with the synchronous call to show()/hide() together with the patch.
I would prefer if you test the patch only against master so we can tell what it's fixed by it and what is fixed by your changes. I'm not at how in the investments area so I don't know which widgets should be shown or not but I can work on the mechanism that makes showing/hiding work without issues. Thanks, Regards, Cristian 2013/9/22 aga <agande...@gmail.com>: > On Sun, 22 Sep 2013 17:46:43 +0300 > Cristian Oneț <onet.crist...@gmail.com> wrote: > >> 2013/9/12 Cristian Oneț <onet.crist...@gmail.com>: >> > 2013/9/12 allan <agande...@gmail.com>: >> >> https://bugs.kde.org/show_bug.cgi?id=312816 >> >> >> >> --- Comment #5 from allan <agande...@gmail.com> --- >> >> Incidentally, this problem with the edit widgets >> >> disappearing/appearing when wanted/unwanted is present in an >> >> unpatched git HEAD, and has been there for a long while. Opening >> >> any investment transaction, then resizing the window, will produce >> >> it with one or more widgets. From some fresh experiments, if a >> >> hide() (or show()) does not do the necessary, then often replacing >> >> with setCalculatorButtonVisible(false) and lineedit()->hide() does >> >> the trick. Sadly though, that does not work in every case, and it >> >> looks like the only sure-fire fix is the one I came up with, >> >> setting the widget height to zero instead of hiding. >> > >> > Yes I know about this behavior. I will also try to take a look at it >> > and maybe find a better solution then delayed calls to hide()/show() >> > or other workarounds that seem to do the trick. I would prefer to >> > know the cause of this issue and make a proper fix for it. >> >> I had some time to take a look at this and attached a patch with a >> proper fix for showing only the needed widgets after a resize. The >> problem was caused by the fact that the resize action was making the >> hidden edit widgets visible. >> >> Allan could you check if the patch fixes this problem on your setup >> also? If it does then we can fix the invest transaction editor related >> bugs without touching the current show/hide mechanism. >> >> Regards, >> Cristian > > I've so far applied your patches on top of mine, without reverting the > show() and hide() methods. Mostly, it looks OK, except for reinvest > dividends, where the interest edit widget flickers, and, to a lesser > extent, the quantity widget. > > I've not started to look at the code yet. > > Allan > > _______________________________________________ > KMyMoney-devel mailing list > KMyMoney-devel@kde.org > https://mail.kde.org/mailman/listinfo/kmymoney-devel _______________________________________________ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel