Changeset 7279


Ignore:
Timestamp:
Jan 23, 2018, 6:56:45 PM (4 years ago)
Author:
krauss
Message:

Filter string for open file dialog fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypWin/MainWindow.FileIO.cs

    r7270 r7279  
    281281        private string CreateOpenProjectFilter()
    282282        {
     283            string defaultPattern = "cwm (*.cwm)|*.cwm";
     284
    283285            try
    284286            {
    285287                var ext = ComponentInformations.EditorExtension.Values.ToDictionary(t => t.GetPluginInfoAttribute().Caption, t => t.GetEditorInfoAttribute().DefaultExtension);
    286                 if (ext.Count() == 0) return "cwm (*.cwm)";
     288                if (ext.Count() == 0) return defaultPattern;
    287289
    288290                string filter = String.Join("|", ext.Select(i => string.Format("{0} (*.{1})|*.{1}", i.Key, i.Value)));
     
    292294                    filter = string.Format("All ({0})|{0}|{1}", allExtensions, filter);
    293295                }
    294 
     296               
    295297                return filter;
    296298            }
     
    299301                //creating the default extensions using the plugins failed
    300302                //so return only cwm since this is the default file extension
    301                 return "cwm (*.cwm)";
     303                return defaultPattern;
    302304            }
    303305        }
Note: See TracChangeset for help on using the changeset viewer.