OSDN Git Service

重複したClearImageSelectedPicture()メソッドの呼び出しを削除
authorKimura Youichi <kim.upsilon@bucyou.net>
Sat, 10 May 2014 09:47:02 +0000 (18:47 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 10 May 2014 10:13:00 +0000 (19:13 +0900)
OpenTween/Tween.cs

index 15656b9..eb775b6 100644 (file)
@@ -12445,10 +12445,10 @@ namespace OpenTween
 
         private void ImageFromSelectedFile(bool suppressMsgBox)
         {
+            this.ClearImageSelectedPicture();
+
             try
             {
-                ClearImageSelectedPicture();
-
                 ImagefilePathText.Text = ImagefilePathText.Text.Trim();
                 if (string.IsNullOrEmpty(ImagefilePathText.Text) || string.IsNullOrEmpty(this.ImageService))
                 {
@@ -12503,20 +12503,17 @@ namespace OpenTween
                         ImageSelectedPicture.Tag = MyCommon.UploadFileType.MultiMedia;
                         break;
                     default:
-                        ClearImageSelectedPicture();
                         ImagefilePathText.Text = "";
                         break;
                 }
             }
             catch (FileNotFoundException)
             {
-                ClearImageSelectedPicture();
                 ImagefilePathText.Text = "";
                 if (!suppressMsgBox) MessageBox.Show("File not found.");
             }
             catch (Exception)
             {
-                ClearImageSelectedPicture();
                 ImagefilePathText.Text = "";
                 if (!suppressMsgBox) MessageBox.Show("The type of this file is not image.");
             }