WPCubed Product Support

FEDPOL #90 - OnToolBarIconSelection

In the function TWPCustomRichText.OnToolBarIconSelection the function OpenDialog is called in several places. It can happen that during OpenDialog an event is raised, in which case the action is stuck in the checked state. For instance, if an exception is raised during a file save, then there will be a check mark in the menu next to the "save" item. If you then select this item, the check will disappear but the action will not be executed. Selecting it a second time will execute the action again.

I think it is better to replace

OpenDialog(xxx);desel := TRUE;Typ := wptNone;

with

desel := TRUE;Typ := wptNone;OpenDialog(xxx);

or

try
    OpenDialog(xxx);
finally
    desel := TRUE;
    Typ := wptNone;
end;

It would also be better to remove the try/except from WPI_CO_Open because if something goes wrong during the opening of a file, WPTools will eat the exception and the user/program will never know.

#1 ♥ 0
2.9k Views 2 users read 1 min
support

Hi,

thanks for the suggestion. The new V5.24.3 incorporates the change and also so,ves the image problems #89 and #88

Julian

#2 ♥ 0
This category is archived. No new posts are possible.