mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:00:16 +08:00
Remember state of WordWrap button on text and hex editor. Fixes issue #2055.
This commit is contained in:
@ -83,6 +83,7 @@ begin
|
||||
OpenRegistry;
|
||||
MainReg.WriteInteger( REGNAME_EDITOR_WIDTH, Width );
|
||||
MainReg.WriteInteger( REGNAME_EDITOR_HEIGHT, Height );
|
||||
MainReg.WriteBool(REGNAME_EDITOR_WORDWRAP, btnWrap.Down);
|
||||
end;
|
||||
|
||||
|
||||
@ -91,6 +92,8 @@ begin
|
||||
// Restore form dimensions
|
||||
Width := GetRegValue(REGNAME_EDITOR_WIDTH, DEFAULT_EDITOR_WIDTH);
|
||||
Height := GetRegValue(REGNAME_EDITOR_HEIGHT, DEFAULT_EDITOR_HEIGHT);
|
||||
if GetRegValue(REGNAME_EDITOR_WORDWRAP, btnWrap.Down) then
|
||||
btnWrap.Click;
|
||||
// Fix label position:
|
||||
lblTextLength.Top := tlbStandard.Top + (tlbStandard.Height-lblTextLength.Height) div 2;
|
||||
SetWindowSizeGrip(Handle, True);
|
||||
|
@ -105,6 +105,7 @@ const
|
||||
DEFAULT_EDITOR_WIDTH = 100;
|
||||
REGNAME_EDITOR_HEIGHT = 'MemoEditorHeight';
|
||||
DEFAULT_EDITOR_HEIGHT = 100;
|
||||
REGNAME_EDITOR_WORDWRAP = 'MemoEditorWrap';
|
||||
REGNAME_DELIMITER = 'Delimiter';
|
||||
DEFAULT_DELIMITER = ';';
|
||||
REGNAME_SQLHELPWINLEFT = 'SQLHelp_WindowLeft';
|
||||
|
@ -171,6 +171,7 @@ begin
|
||||
OpenRegistry;
|
||||
MainReg.WriteInteger( REGNAME_EDITOR_WIDTH, Width );
|
||||
MainReg.WriteInteger( REGNAME_EDITOR_HEIGHT, Height );
|
||||
MainReg.WriteBool(REGNAME_EDITOR_WORDWRAP, btnWrap.Down);
|
||||
end;
|
||||
|
||||
|
||||
@ -179,6 +180,8 @@ begin
|
||||
// Restore form dimensions
|
||||
Width := GetRegValue(REGNAME_EDITOR_WIDTH, DEFAULT_EDITOR_WIDTH);
|
||||
Height := GetRegValue(REGNAME_EDITOR_HEIGHT, DEFAULT_EDITOR_HEIGHT);
|
||||
if GetRegValue(REGNAME_EDITOR_WORDWRAP, btnWrap.Down) then
|
||||
btnWrap.Click;
|
||||
// Fix label position:
|
||||
lblTextLength.Top := tlbStandard.Top + (tlbStandard.Height-lblTextLength.Height) div 2;
|
||||
SetWindowSizeGrip(Handle, True);
|
||||
|
Reference in New Issue
Block a user