Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-09

Option to deactivate always open Menu Editor

8 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael W. Vogel

Hi,

I like the new Menu Editor in Lazarus 1.7 Trunk, it is much better than in Lazarus 1.6!

There is one thing, which I liked more in 1.6 than in 1.7.

In 1.6, I could create some MenuItems, close the Menu Editor. Then, in Object Inspector, I rename the MenuItems and gave them some Actions.

In 1.7, always when I select a MenuItem in Object Inspector, the Menu Editor is opened. Is there a option to deactivate it?

Thank you

Kind regards

Michl

Reply by email

Juha Manninen
to Michael W. Vogel
Michael W. Vogel wrote 5 lines
In 1.6, I could create some MenuItems, close the Menu Editor. Then, in Object Inspector, I rename the MenuItems and gave them some Actions. In 1.7, always when I select a MenuItem in Object Inspector, the Menu Editor is opened. Is there a option to deactivate it?

I deactivated it in r53074. Please test.

Juha

Reply by email

Michael W. Vogel
to Juha Manninen

Hi Juha,

I checked r53075 (32bit FPC trunk r34637, Windows 7). The behaviour here isn't changed. Always, I select a MenuItem in object inspector, the menu editor is opened.
A other curious thing (I don't know if it is wanted), in its Caption stands: "Form1.MainMenu1.MenuItem1 - OnClick: is not assigned".

If this isn't a wanted behavoiur, I can check this issue this evening, if you want.

Kind regards

Michl

Juha Manninen wrote
I deactivated it in r53074. Please test. Juha

Reply by email

Juha Manninen
to Michael W. Vogel
Michael W. Vogel wrote 5 lines
I checked r53075 (32bit FPC trunk r34637, Windows 7). The behaviour here isn't changed. Always, I select a MenuItem in object inspector, the menu editor is opened. A other curious thing (I don't know if it is wanted), in its Caption stands: "Form1.MainMenu1.MenuItem1 - OnClick: is not assigned".

Uhhh!
I am sure it worked then but not any more.
The menu editor is now shown through some unknown route. It does not use neither of these:

 procedure ShowMenuEditor(aMenu: TMenu);
 function MenuDesigner: TMenuDesigner;
If this isn't a wanted behavoiur, I can check this issue this evening, if you want.

Yes please if you have time and energy.

Juha

Reply by email

Michael W. Vogel
to Juha Manninen

Hi Juha,

I tested the issue a while and I can't see any unwanted side effects, so I added a patch here: http://bugs.freepascal.org/view.php?id=30712

See you

Kind regards

Michl

Juha Manninen wrote 21 lines
On Fri, Oct 7, 2016 at 4:42 PM, Michael W. Vogel via Lazarus wrote: > I checked r53075 (32bit FPC trunk r34637, Windows 7). The behaviour here > isn't changed. Always, I select a MenuItem in object inspector, the menu > editor is opened. > A other curious thing (I don't know if it is wanted), in its Caption stands: > "Form1.MainMenu1.MenuItem1 - OnClick: is not assigned". Uhhh! I am sure it worked then but not any more. The menu editor is now shown through some unknown route. It does not use neither of these: procedure ShowMenuEditor(aMenu: TMenu); function MenuDesigner: TMenuDesigner; > If this isn't a wanted behavoiur, I can check this issue this evening, if > you want. Yes please if you have time and energy. Juha

Reply by email

Juha Manninen
to Juha Manninen

OK!
Your patch made me understand the actual problem

The OnDesignerSetSelection handler was only added to GlobalDesignHook when the form was created but it was never removed. That was another bug.
The right place to add/remove that handler is when the window is shown/hidden. I fixed it in r53087. Please test.
TMenuItemsPropertyEditor is not needed, just as I anticipated.

Juha

Reply by email

Michael W. Vogel
to Juha Manninen
Juha Manninen wrote 7 lines
I am puzzled, what is the purpose of the now uncommented TMenuItemsPropertyEditor? As its comment says "property editor for TMenuItem properties. Invokes the parent menu's component editor." ... but the whole idea was NOT to invoke it.

I didn't know, if it is needed elsewhere. You deactivated it for the current issue, but it doesn't make any difference. So I activated again. Anyway, if it isn't needed somewhere else, it can be removed. Sorry for the trouble.

Juha Manninen wrote
The OnDesignerSetSelection handler was only added to GlobalDesignHook when the form was created but it was never removed. That was another bug.

Ah OK, I doesn't think of that. I tested r53087 and it works fine here.

Thank you very much!

Kind regards

Michl

Reply by email