MainMenu: previously hidden menu item isn't displayed again lazarus / 31-LCL ---------------------------------------------------------------------- zoltanleo · 2021-09-14 11:46 Hi folks. I tried to programmatically hide the menu item and then show it again. I have failed. In contrast, the enable property works as expected. Is that how it should be? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.FormShow(Sender: TObject);begin  CheckBox1Change(Sender);end; procedure TForm1.CheckBox1Change(Sender: TObject);begin  miMiddle.Visible:= not CheckBox1.Checked;  mileft.Enabled:= CheckBox1.Checked;end; ---------------------------------------------------------------------- zoltanleo · 2021-09-14 11:47 testcase ---------------------------------------------------------------------- Zvoni · 2021-09-14 11:58 Repaint the form? ---------------------------------------------------------------------- zoltanleo · 2021-09-14 12:00 Quote from: Zvoni on September 14, 2021, 01:58:44 pmRepaint the form? No effect ---------------------------------------------------------------------- Seenkao · 2021-09-14 12:06 В Linux работает. Yandex translate: It works on Linux. ---------------------------------------------------------------------- Zvoni · 2021-09-14 12:15 Works on Win10 Pro 64-Bit FPC3.2.0/LAZ2.0.12 both 32-Bit ---------------------------------------------------------------------- zoltanleo · 2021-09-14 12:26 Hmmmm. I'm use trunk fpc/laz. ---------------------------------------------------------------------- Seenkao · 2021-09-14 16:44 Удали файл *.lpi и попробуй. Может что в настройках нахимичил? (мне приходится его удалять, для запуска проекта). yandex translate: Delete the *.lpi file and try it. Maybe you did something in the settings? (I have to delete it to run the project). ---------------------------------------------------------------------- JuhaManninen · 2021-09-14 17:59 Quote from: Seenkao on September 14, 2021, 06:44:11 pmDelete the *.lpi file and try it. Maybe you did something in the settings? The project cannot be opened without an *.lpi file. It is the main project info file and should not affect any GUI menu update issues. ---------------------------------------------------------------------- jamie · 2021-09-14 22:39 I can load the project fine using the trunk. It looks like MDI code that was worked on at some point in recent releases is effecting the issue.. There is code that merges and unmerges main menus from child MDI forms. I believe it is causing problems. ---------------------------------------------------------------------- Seenkao · 2021-09-15 21:28 Quote from: JuhaManninen on September 14, 2021, 07:59:38 pmThe project cannot be opened without an *.lpi file. It is the main project info file and should not affect any GUI menu update issues. Я боюсь, вы ужаснётесь, когда узнаете сколько раз я удалял *.lpi файл, для того чтоб запустить проект на: другой машине/другой системе; или из-за какой либо попавшей в проект информации, которая портит проект (очень много ненужного хлама скапливается в файле). Разбираться что изменилось в файле у меня зачастую нет желания. А править запуск проекта дополнительными символами, я не считаю правильным, они нужны лишь в определённых случаях. Да, я прекрасно понимаю, что для больших проектов, удаление файла *.lpi - не является правильным решением. Потому что зачастую проект приходится заново перенастраивать. yandex translate: I'm afraid you will be horrified when you find out how many times I deleted the*. lpi file in order to run the project on: another machine/another system; or because of any information that got into the project that spoils the project (a lot of unnecessary junk accumulates in the file). I often have no desire to understand what has changed in the file. And I don't think it's right to edit the launch of the project with additional symbols, they are needed only in certain cases. Yes, I understand perfectly well that for large projects, deleting the *.lpi file is not the right solution. Because often the project has to be reconfigured again. ---------------------------------------------------------------------- zoltanleo · 2021-09-15 22:49 @Seenkao Rus: мне кажется не стоит флудить. Как сказали выше, содержимое lpi- файла никак не связано с описанной проблемой. Eng: I think that the contents of the lpi file have nothing to do with the problem described. It might be worth creating a ticket in the bug tracker. What do you think of it? ---------------------------------------------------------------------- JuhaManninen · 2021-11-06 18:08 Quote from: Seenkao on September 15, 2021, 11:28:54 pmI'm afraid you will be horrified when you find out how many times I deleted the*. lpi file in order to run the project on: another machine/another system; or because of any information that got into the project that spoils the project (a lot of unnecessary junk accumulates in the file). I often have no desire to understand what has changed in the file. And I don't think it's right to edit the launch of the project with additional symbols, they are needed only in certain cases. I failed to notice this reply from September. Maybe your session data is stored in the .lpi file. Go to Project Options -> Session and select "Save in .lps file in project directory". Also some Build Mode data can be stored in the session. Go to the Build Mode management window, up in the Project Options. The .lpi project info files are reasonably small without the session data. Projects are cross-platform, they are meant to be copied and built in different systems. A session on the other hand is local and should not be copied elsewhere. It contains editor file history and such private info. ---------------------------------------------------------------------- zoltanleo · 2021-11-06 19:07 Hi Werner. I think this behavior can be called a bug.  The visible property "worked" in version 2.0.12 (I checked for Windows) and "doesn't work" for the trunk.  Don't you think this is strange? ---------------------------------------------------------------------- wp · 2021-11-06 20:48 Sorry, I had deleted my post before your response when I noticed that hiding a menu item does work in v2.0.12 even on Windows. ---------------------------------------------------------------------- wp · 2021-11-06 21:22 Found the guilty revision to be   SHA-1: f6c39c019dcb4bbd8371ab322206239644fc4d83   * LCL: implement MDI for win32. Issue #36582, based on patch by Kostas Michalopoulos, attempt 2   git-svn-id: trunk@62745 committed on March 12 2020, by Ondrej. Unfortunately this commit contains a lot of changes, and it is difficult to extract where visibility of the hidden items is affected. ---------------------------------------------------------------------- zoltanleo · 2021-11-07 03:55 Somebody create a new ticket in the bug tracker, please ---------------------------------------------------------------------- wp · 2021-11-07 10:55 Reported as https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39458. ---------------------------------------------------------------------- zoltanleo · 2021-11-07 11:48 Thank U Werner ---------------------------------------------------------------------- wp · 2021-11-19 16:09 The issue has been fixed by Ondrej in trunk/main (https://gitlab.com/f reepascal.org/lazarus/lazarus/- /commit/89cd2a10452bbd3630775feefc9422fb23ab8ef8). ---------------------------------------------------------------------- zoltanleo · 2021-11-19 16:38 Quote from: wp on November 19, 2021, 05:09:00 pmThe issue has been fixed by Ondrej in trunk/main (https://gitlab.com/freepascal.org/lazar us/lazarus/-/commit/89cd2a10452bbd3630775feefc9422fb23ab8ef8). Perfect.  Thanks for the help