Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocTab selection underline not updated when deleting an Item #3905

Closed
2 tasks done
matwachich opened this issue May 22, 2023 · 4 comments
Closed
2 tasks done

DocTab selection underline not updated when deleting an Item #3905

matwachich opened this issue May 22, 2023 · 4 comments
Labels
unverified A bug that has been reported but not verified

Comments

@matwachich
Copy link
Contributor

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

Deleting a tab item N, while N+1 is selected, will not update the selection underline bar.

How to reproduce

Run the code, add 3 tabs, select tab 2, close tab 1, see the selection bar is under tab 3 rather than 2

Screenshots

image

Example code

package main

import (
	"fmt"

	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/theme"
	"fyne.io/fyne/v2/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("Test")

	tab := container.NewDocTabs()

	count := 1
	btn := widget.NewButton("Add Tab", func() {
		tab.Append(container.NewTabItemWithIcon(
			fmt.Sprintf("Tab Item %d", count), theme.HomeIcon(), widget.NewLabel(fmt.Sprintf("Tab Content %d", count)),
		))
		tab.SelectIndex(len(tab.Items) - 1)
		count += 1
	})

	w.SetContent(container.NewBorder(btn, nil, nil, nil, tab))
	w.ShowAndRun()
}

Fyne version

develop v2.3.4-rc1.0.20230516195251-56dd0f3e0f32

Go compiler version

1.20

Operating system and version

Windows 10

Additional Information

No response

@matwachich matwachich added the unverified A bug that has been reported but not verified label May 22, 2023
@matwachich

This comment was marked as off-topic.

@Jacalz

This comment was marked as off-topic.

@matwachich
Copy link
Contributor Author

Unfortunatly, this PR did not solve this bug report.

Try the code above :

  • Add 3 tabs
  • Select 2nd tab
  • Close first tab

see selection bar not syncronized.

andydotxyz added a commit to andydotxyz/fyne that referenced this issue Jul 11, 2023
@andydotxyz
Copy link
Member

Fixed on develop :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unverified A bug that has been reported but not verified
Projects
None yet
Development

No branches or pull requests

3 participants