Feature #765

TextCtrl::StdBar should also draw undo & redo icons

Added by Zbigniew Rebacz over 7 years ago. Updated over 7 years ago.

Status:ApprovedStart date:04/25/2014
Priority:LowDue date:
Assignee:Miroslav Fidler% Done:

0%

Category:CtrlLibSpent time:-
Target version:-

Description

It would be nice to have this two additional icons in bar...

Code (CtrlLib/Text.cpp - line 664):

void TextCtrl::StdBar(Bar& menu) {
    NextUndo();
    if(undosteps) {
        menu.Add(undo.GetCount() && IsEditable(), t_("Undo"), CtrlImg::undo(), THISBACK(Undo))
            .Key(K_ALT_BACKSPACE)
            .Key(K_CTRL_Z);
        menu.Add(redo.GetCount() && IsEditable(), t_("Redo"), CtrlImg::redo(), THISBACK(Redo))
            .Key(K_SHIFT|K_ALT_BACKSPACE)
            .Key(K_SHIFT_CTRL_Z);
        menu.Separator();
    }
    ...
}

BTW, It seems that EditField dosen't full support redo/undo operation. It meens that it can remember only one step.

Text.cpp Magnifier (13.6 KB) Zbigniew Rebacz, 04/25/2014 09:10 PM

History

#1 Updated by Miroslav Fidler over 7 years ago

  • Status changed from Patch ready to Approved

OK!

Also available in: Atom PDF