kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #42619
Re: [PATCH] Kicad: project manager: Do not reconstruct entire project tree when renaming file to different dir
I pushed a smarter version of my original fix. @Mikolaj & @Ian if you could test it on Windows and GTK that would be great.
Cheers,
Jeff.
> On 15 Nov 2019, at 22:27, Ian McInerney <Ian.S.McInerney@xxxxxxxx> wrote:
>
> Scratch my last. It is GTK with the problems. When I rename the file to a new directory with this patch, the tree never seems to update. I have to manually refresh it in order for the file to appear in the correct place.
>
> -Ian
>
> On Fri, Nov 15, 2019 at 10:21 PM Mikołaj Wielgus <wielgusmikolaj@xxxxxxxxx <mailto:wielgusmikolaj@xxxxxxxxx>> wrote:
> Yes, I'm on Windows (the details are in the linked related bug report).
>
> Sorry for the return value problem -- I failed to notice the warnings in console.
>
> Best regards,
> Mikołaj Wielgus
>
>
> On Fri, Nov 15, 2019 at 11:07 PM Ian McInerney <Ian.S.McInerney@xxxxxxxx <mailto:Ian.S.McInerney@xxxxxxxx>> wrote:
> I'll give it a test on GTK once my build here finishes, but I don't think I have seen any issues with file watcher on GTK in the past.
>
> -Ian
>
> On Fri, Nov 15, 2019 at 10:03 PM Jeff Young <jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>> wrote:
> Hi Mikolaj,
>
> The Mac compiler doesn’t like Rename() returning values when the return type is void. However, after fixing that it works fine on Mac.
>
> I remember however something about the file watcher not working on all platforms. I thought the problem platform was Windows, though, so maybe I’m not remembering it correctly (as you’re on Windows, right?).
>
> Can someone validate that this works on GTK?
>
> Cheers,
> Jeff.
>
>
>> On 15 Nov 2019, at 21:05, Mikołaj Wielgus <wielgusmikolaj@xxxxxxxxx <mailto:wielgusmikolaj@xxxxxxxxx>> wrote:
>>
>> Hi,
>>
>> Renaming file to a different directory causes the entire project tree to be recreated, which causes all subdirectories to collapse, unexpectedly to the user.
>>
>> This patch solves the problem by deleting the original node after moving the file. Then the file watcher raises an event whose handler constructs a new node in the new location.
>>
>> This issue comes from the fix to this bug:
>> https://bugs.launchpad.net/kicad/+bug/1852431 <https://bugs.launchpad.net/kicad/+bug/1852431>
>>
>> Best Regards,
>> Mikołaj Wielgus
>> <0001-Do-not-reconstruct-proj-tree-on-rename-to-diff-dir.patch>_______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
>> More help : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
> More help : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>
Follow ups
References