SlickEdit Community
Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2017 v22 Beta Discussion => Topic started by: rowbearto on September 05, 2017, 06:10:40 PM
-
I'm able to reproduce this problem in a VM that I provided in another post: https://community.slickedit.com/index.php/topic,15458.msg58927.html#msg58927
Follow the instructions in that post and get to the point where both "RunContext.hh" and "RunContext.cc" are open.
Make the "Files" tool window visible, and dock it to the same group of windows as "Project", "Open", etc, as illustrated in attached "name_offscreen1.png".
Double click on the part of the file with the "Path" in it, and you will see that the "Name" column disappears and need to scroll to the left to see it again.
See attached pictures for a more graphical description.
-
This is how the Qt tree operates. If there is a scroll bar (or maybe even if there isn't), when you click on something it scrolls it into view horizontally. Normally the only place you see it is the tool windows that are docked horizontally.
-
Is there anything in the Qt API to turn off this behavior?
-
I haven't found anything, and I have looked. But I'll take another peek.
-
OK, thanks for looking.
Now I know to be careful to only click in the "Name" column to avoid this.
-
You can fix this with a change to TBFILELIST.e - and unfortunately, similar changes in other tool windows that have the same problem. Basically, what this does is if you click on the 2nd or later columns it makes like you clicked on the 1st column.
The side effect is now you get the scroll-left problem -- when you click on an item, it will always scroll to the left - but usually this is better than scrolling to the right.
In tbfilelist.e change the lbutton_up() function:
#define FIX_SCROLLER
void ctl_file_list.lbutton_up()
{
#ifdef FIX_SCROLLER
// This is the change to keep the horizonal scroller to the left.
// Same code needs to be added to many of the Slickedit listboxes that have the auto-right-scroll bug.
if (true) {
int curIndex=_TreeCurIndex();
if (curIndex<0) {
return;
}
// get a list of the selected items
int buffers_to_close[];
buffers_to_close._makeempty();
bufid := 0;
int info;
for (ff:=1;;ff=0) {
index := ctl_file_list._TreeGetNextSelectedIndex(ff,info);
if (index <= 0 && ff)
index = ctl_file_list._TreeCurIndex();
if (index <= 0)
break;
buffers_to_close[buffers_to_close._length()] = index;
}
int sib = _TreeGetNextSiblingIndex(curIndex);
if (sib >= 0) {
_TreeDeselectAll();
_TreeSetCurIndex(sib);
}
_TreeSetCurIndex(curIndex);
for (i:=0; i<buffers_to_close._length(); ++i) {
_TreeSelectLine(buffers_to_close[i], false);
}
}
#else
if (p_active_form.p_name == DOCUMENT_TAB_FORM) {
open_selected_files();
}
#endif
}
-
I'd be happy with this change in tbfilelist.e and a scroll left "problem".
Perhaps the official SE build can add a variable to enable/disable to always scroll left in these situations? Then for folks who want to always scroll left we can set this variable.