From 1651fd98fd927dae76ec04932306512e1c81e391 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Sun, 20 Nov 2016 16:55:37 +0900 Subject: [PATCH] =?utf8?q?=E3=83=9F=E3=83=A5=E3=83=BC=E3=83=88=E3=82=BF?= =?utf8?q?=E3=83=96=E3=81=AE=E5=90=8D=E5=89=8D=E3=82=92=E5=A4=89=E6=9B=B4?= =?utf8?q?=E3=81=99=E3=82=8B=E3=81=A8=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C?= =?utf8?q?=E7=99=BA=E7=94=9F=E3=81=99=E3=82=8B=E4=B8=8D=E5=85=B7=E5=90=88?= =?utf8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit https://osdn.net/ticket/browse.php?group_id=6526&tid=36805 Fixes: 8538894c ("タブ名の変更時にlistView{Scroll,Selection}のキーも合わせて変更する") --- OpenTween/Resources/ChangeLog.txt | 1 + OpenTween/Tween.cs | 30 +++++++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/OpenTween/Resources/ChangeLog.txt b/OpenTween/Resources/ChangeLog.txt index d06a0707..79141a7c 100644 --- a/OpenTween/Resources/ChangeLog.txt +++ b/OpenTween/Resources/ChangeLog.txt @@ -13,6 +13,7 @@ - 同現象に対して v1.3.5 で適切に修正できていなかった不具合です * FIX: Favoritesタブの「前のデータを取得」が通常の更新と同じ挙動になる不具合を修正 (thx @kakk0u!) * FIX: 地図サムネイル表示時のエラーが適切に処理されない不具合を修正 (thx @sobachanko!) + * FIX: ミュートタブの名前を変更しようとするとエラーが発生する不具合を修正 ==== Ver 1.3.5(2016/10/01) * NEW: 140文字を越えるツイートの表示に対応しました diff --git a/OpenTween/Tween.cs b/OpenTween/Tween.cs index 454e5ce3..ae569a7d 100644 --- a/OpenTween/Tween.cs +++ b/OpenTween/Tween.cs @@ -7468,24 +7468,28 @@ namespace OpenTween } var tabPage = this.ListTab.TabPages.Cast() - .First(x => x.Text == origTabName); + .FirstOrDefault(x => x.Text == origTabName); - ListViewScroll scrollInfo; - if (this.listViewScroll.TryGetValue(origTabName, out scrollInfo)) + if (tabPage != null) { - this.listViewScroll.Remove(origTabName); - this.listViewScroll[newTabName] = scrollInfo; - } + ListViewScroll scrollInfo; + if (this.listViewScroll.TryGetValue(origTabName, out scrollInfo)) + { + this.listViewScroll.Remove(origTabName); + this.listViewScroll[newTabName] = scrollInfo; + } - ListViewSelection selectionInfo; - if (this.listViewSelection.TryGetValue(origTabName, out selectionInfo)) - { - this.listViewSelection.Remove(origTabName); - this.listViewSelection[newTabName] = selectionInfo; + ListViewSelection selectionInfo; + if (this.listViewSelection.TryGetValue(origTabName, out selectionInfo)) + { + this.listViewSelection.Remove(origTabName); + this.listViewSelection[newTabName] = selectionInfo; + } + + //タブ名を変更 + tabPage.Text = newTabName; } - //タブ名を変更 - tabPage.Text = newTabName; _statuses.RenameTab(origTabName, newTabName); SaveConfigsCommon(); -- 2.11.0