Bug #1402

Clicking on edit as text, designer and hex when exactly the same option is active on the same file causing refresh

Added by Zbigniew Rebacz about 8 years ago. Updated about 8 years ago.

Status:ApprovedStart date:04/03/2016
Priority:NormalDue date:
Assignee:Miroslav Fidler% Done:

0%

Category:IDESpent time:-
Target version:Release 2017.1

Description

It seems that we have't got any protection against clicking on edit as text on the same file more than one times. It always cause view refresh. The problem here is that we haven't got any protection mechanism against this situation. The simply solution is to add editashex.Find():

void Ide::EditAsHex()
{
    String path = editfile;
    if(editashex.Find(path) >= 0)
        return;
    editastext.RemoveKey(editfile);
    editashex.FindPut(editfile);
    byte cs = editor.GetCharset();
    FlushFile();
    EditFile0(path, cs);
}

The same option must be applied to text and designer (included in diff).

ViewSwitchFix.diff Magnifier (960 Bytes) Zbigniew Rebacz, 04/03/2016 02:01 PM

History

#1 Updated by Zbigniew Rebacz about 8 years ago

  • Subject changed from Clicking on edit as text, designer and hex when exactly the smae option is active causing refresh to Clicking on edit as text, designer and hex when exactly the same option is active on the same file causing refresh

#2 Updated by Miroslav Fidler about 8 years ago

  • Status changed from Patch ready to Approved

Also available in: Atom PDF