mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 13:45:00 +00:00
fix<Bookmark>: bookmark changes will not be saved when there's no welcome page
This commit is contained in:
parent
6e624797ae
commit
afe0220a46
4 changed files with 19 additions and 15 deletions
|
@ -18,15 +18,9 @@ namespace SourceGit.Views.Widgets {
|
|||
public Welcome() {
|
||||
InitializeComponent();
|
||||
UpdateVisibles();
|
||||
Models.Theme.AddListener(this, UpdateVisibles);
|
||||
|
||||
Models.Watcher.BookmarkChanged += (repoPath, bookmark) => {
|
||||
var repo = Models.Preference.Instance.FindRepository(repoPath);
|
||||
if (repo != null) {
|
||||
repo.Bookmark = bookmark;
|
||||
UpdateVisibles();
|
||||
}
|
||||
};
|
||||
Models.Theme.AddListener(this, UpdateVisibles);
|
||||
Models.Watcher.BookmarkChanged += (_, __) => { UpdateVisibles(); };
|
||||
}
|
||||
|
||||
#region FUNC_EVENTS
|
||||
|
@ -148,7 +142,7 @@ namespace SourceGit.Views.Widgets {
|
|||
|
||||
var refIdx = i;
|
||||
mark.Click += (o, ev) => {
|
||||
Models.Watcher.SetBookmark(repo.Path, refIdx);
|
||||
repo.Bookmark = refIdx;
|
||||
ev.Handled = true;
|
||||
};
|
||||
bookmark.Items.Add(mark);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue