Full improvements for #1402

git-svn-id: svn://ultimatepp.org/upp/trunk@9670 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
klugier 2016-04-03 13:53:54 +00:00
parent be7c477e06
commit bd6e8aec28

View file

@ -582,10 +582,10 @@ void Ide::TriggerAssistSync()
void Ide::EditAsHex()
{
String path = editfile;
if(editashex.Find(path) >= 0)
return;
editastext.RemoveKey(path);
editashex.FindPut(path);
if(editashex.Find(path) >= 0)
return;
editastext.RemoveKey(editfile);
editashex.FindPut(editfile);
byte cs = editor.GetCharset();
FlushFile();
EditFile0(path, cs);
@ -608,6 +608,8 @@ void Ide::DoEditAsText(const String& path)
void Ide::EditAsText()
{
String path = editfile;
if(editastext.Find(path) >= 0)
return;
if(!FileExists(path))
return;
DoEditAsText(path);
@ -619,6 +621,8 @@ void Ide::EditAsText()
void Ide::EditUsingDesigner()
{
String path = editfile;
if (editastext.Find(editfile) < 0 && editashex.Find(editfile) < 0)
return;
editashex.RemoveKey(editfile);
editastext.RemoveKey(editfile);
byte cs = editor.GetCharset();