Fold expansion is wrong when clicked on |+>

luowy
Posts: 234
Joined: Mon Oct 20, 2014 12:52 pm

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

Post 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.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

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

Post 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
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

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

Post 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
Bernhard
Posts: 68
Joined: Tue Sep 17, 2013 6:56 am
Location: Munich, Germany

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

Post 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.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

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

Post by Josef Templ »

FYI: this seems to be a bug related to issue-#32.
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

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

Post 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.
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

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

Post 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
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

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

Post 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
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

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

Post 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
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

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

Post 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
Post Reply