Page 2 of 3

Re: Fold expansion is wrong when clicked on |+>

Posted: Thu Sep 01, 2016 4:50 am
by luowy
sorry ,I'm confused about your pictures, I prefer a odc file(encoded) instead of these, then I can copy it to 1.7,1.6 to check the diff.

Re: Fold expansion is wrong when clicked on |+>

Posted: Thu Sep 01, 2016 5:45 am
by Josef Templ
I also find this behavior inconvenient, probably a bug.
It is unlikely that it was intended this way because the caret is set
correctly but the scroll position differs.

I would expect this to be fixed easily.

For testing, you can use Info->Repository and then use the fold of Dev.

- Josef

Re: Fold expansion is wrong when clicked on |+>

Posted: Thu Sep 01, 2016 8:14 am
by Zinn
Doug, I found the error. Just change the following lines

Code: Select all

		font.GetBounds(asc, dsc, fw);
		w := asc * 29 DIV 20;
		h := asc + dsc
	END CalcSize;
back to the original lines of BlackBox 1.6

Code: Select all

		w := font.StringWidth(icon);
		font.GetBounds(asc, dsc, fw);
		h := asc + dsc
	END CalcSize;
and it works.
- Helmut

Re: Fold expansion is wrong when clicked on |+>

Posted: Thu Sep 01, 2016 9:16 am
by Bernhard
DGDanforth wrote: What do you mean by "state"?
oops, a fold has two states: collapsed and expanded. See also Tools->Fold ...

These correspond to |+> ... <+| and |-> ... <-|.
If one of them is empty, the cursor is positioned on the end of the text stretch, when changing state.

But as far as I understand it, Helmut already found and corrected the error, although, when
I apply Helmuts change something strange happens to the fold marks on a state Change.

Re: Fold expansion is wrong when clicked on |+>

Posted: Thu Sep 01, 2016 9:41 am
by Josef Templ
FYI: this seems to be a bug related to issue-#32.

Re: Fold expansion is wrong when clicked on |+>

Posted: Thu Sep 01, 2016 10:29 am
by Robert
Josef Templ wrote:FYI: this seems to be a bug related to issue-#32.
How do I look at that? I went to Redmine -> Issues, changed the Dropdown from "open" to "all", clicked on "View all issues", but no luck.

Re: Fold expansion is wrong when clicked on |+>

Posted: Thu Sep 01, 2016 10:35 am
by Ivan Denisov
Robert wrote:
Josef Templ wrote:FYI: this seems to be a bug related to issue-#32.
How do I look at that? I went to Redmine -> Issues, changed the Dropdown from "open" to "all", clicked on "View all issues", but no luck.
It is easier to modify URL :) Just type 32 to the end.

http://redmine.blackboxframework.org/issues/32

Re: Fold expansion is wrong when clicked on |+>

Posted: Thu Sep 01, 2016 5:18 pm
by Josef Templ
Bernhard wrote:
These correspond to |+> ... <+| and |-> ... <-|.
If one of them is empty, the cursor is positioned on the end of the text stretch, when changing state.
Thanks for the info, Bernhard. I can reproduce it.

The scrolling seems to be triggered by the autoscroll behavior of texts.
Whenever you copy text into some other text, the target is scrolled to the end of the insertion
because the caret is placed at the end of the insertion. This default behavior is for some reason
not overruled in case of expanding an empty fold.

Anyway, I am pretty sure it can be fixed.
The impact of the CalcSize change is not yet clear to me.

- Josef

Re: Fold expansion is wrong when clicked on |+>

Posted: Fri Sep 02, 2016 4:13 am
by DGDanforth
luowy wrote:sorry ,I'm confused about your pictures, I prefer a odc file(encoded) instead of these, then I can copy it to 1.7,1.6 to check the diff.
luowy,
Just copy Guided Tour to a new file in 1.6 and 1.7-rc1. Then select all and create fold.
Clicking on the fold in 1.7-rc1 produces different result from 1.6
-Doug

Re: Fold expansion is wrong when clicked on |+>

Posted: Fri Sep 02, 2016 12:24 pm
by Josef Templ
This bug must be in the framework and it must also exist in 1.6.
It just happens to be uncovered by our changes in issue-#32.

Why?

I have done the editing of the changes of issue-#32 and the center has done
a careful review. It is very unlikely that we introduced such a bug. ;)

And I also have an idea what the problem could be.
Is anybody else working on this?

- Josef