News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Files order in virtual folders

Started by Xaviou, January 14, 2015, 06:22:19 PM

Previous topic - Next topic

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

earlgrey

Not for the moment, I am working on
- my externel lexer loader for scintilla ( which works but will never be accepted by Neil )
- my enhanced OpenFilesList plugin

http://www.mediafire.com/view/qawkuoi05ac8qvu/2015.08.20-cb%20LexerExt%20OFL.png#
* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

earlgrey

#17
trunk@svn10640 - ProjectTreeSortChildrenRecursive()@ProjectManagerUI.cpp : remove the red part and it is ok



static void ProjectTreeSortChildrenRecursive(cbTreeCtrl* tree, const wxTreeItemId& parent)
{
    wxTreeItemIdValue cookie = nullptr;

    tree->SortChildren(parent);

    wxTreeItemId current = tree->GetFirstChild(parent, cookie);
    while (current && tree->ItemHasChildren(current))
    {
        ProjectTreeSortChildrenRecursive(tree, current);
        current = tree->GetNextChild(parent, cookie);
    }
}



It breaks the recursion traveling ; current may not have children, but may have brothers :

while (...) loop :

                                  current ( = first child )
                                      |
                   +------------------------------------+
                   |                                    |
            has children                      dont have children
                   |                                    |
                   v                                    v
    - recursion on current's children    - missing loop on current's brothers
    - loop on current's brothers



You may put the optimization test on 'sterile' nodes inside the while (...) loop. Or code a recurse process differently.
* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

oBFusCATed

I guess you're proposing a fix for the original issue, right?
Can you post a tested patch?  ::)

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

earlgrey

#19
Here it is, I did
diff -au projectmanagerui.cpp@10648 projectmanagerui.cpp@earlgrey > projectmanagerui.cpp.patch
so you patch with
patch projectmanagerui.cpp projectmanagerui.cpp.patch
I :
* added an optimization at method begin
* moved the misplaced original one.
-> bye bye, bug :)
* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

MortenMacFly

Quote from: earlgrey on January 17, 2016, 07:18:10 AM
Here it is, I did
diff -au projectmanagerui.cpp@10648 projectmanagerui.cpp@earlgrey > projectmanagerui.cpp.patch
This won't work on Windows (easily). Can you please just use SVN to create a patch file as suggested?
In your SVN working copy, please run: this command:
svn diff > my.patch
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

oBFusCATed

BTW: Morten have you tried to install git bash? It contains most of the unix tools, so it might have a working version of the patch tool.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MortenMacFly

#22
Quote from: oBFusCATed on January 17, 2016, 11:07:49 AM
BTW: Morten have you tried to install git bash? It contains most of the unix tools, so it might have a working version of the patch tool.
Sure and not only that, so I think I have plenty of versions of "patch", but you don't really want me to go to the command line on Windows, just to apply a patch, right? What frustrates me is that there is an easy way using SVN to create and apply patches, but we get them in so many different formats and for each format I need a special tool. I remember that previously even "patch" was not "patch" but you needed a special version...

Oh it could be that simple...  ;D
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

earlgrey

Here it is

$ cd codeblocks-code
$ svn diff > projectmanagerui.cpp@10668.svn-diff.patch

* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

earlgrey

I see patch has not been yet applied ; If you are afraid of modifying core C::B's UI with not-well-tested patch, you shouldn't : bug was only a small inattention error.
* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

oBFusCATed

In svn after some cleanup and simplification. Thanks.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]