fixes editor key handling, file dialog

This commit is contained in:
Vadim Lopatin 2017-09-08 15:07:01 +03:00
parent 8d84223099
commit d382cbf483
2 changed files with 7 additions and 2 deletions

View File

@ -898,6 +898,7 @@ class FilePathPanelItem : HorizontalLayout {
addChild(_button);
margins(Rect(2.pointsToPixels + 1, 0, 2.pointsToPixels + 1, 0));
}
private bool onTextClick(Widget src) {
if (onPathSelectionListener.assigned)
return onPathSelectionListener(_path);
@ -1134,6 +1135,10 @@ class FileNameEditLine : HorizontalLayout {
/// editor content is changed
Signal!EditableContentChangeListener contentChange;
@property ref Signal!EditorActionHandler editorAction() {
return _edFileName.editorAction;
}
this(string ID = null) {
super(ID);
_caption = UIString.fromId("TITLE_OPEN_FILE"c).value;

View File

@ -1624,6 +1624,7 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
return true;
case SelectAll:
selectAll();
ensureCaretVisible();
return true;
case ToggleBookmark:
if (_content.multiline) {
@ -1654,7 +1655,6 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
_selectionRange.start.pos = 0;
_selectionRange.end = _content.lineEnd(_content.length - 1);
_caretPos = _selectionRange.end;
ensureCaretVisible();
requestActionsUpdate();
}
@ -1809,7 +1809,7 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
// return true;
//}
bool res = super.onKeyEvent(event);
if (focused) startCaretBlinking();
//if (focused) startCaretBlinking();
return res;
}