mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
LFUN to toggle branch inversion status, now available from the
context menu.
This commit is contained in:
parent
5df323a0dd
commit
e1ca7733c3
@ -494,6 +494,7 @@ Menuset
|
||||
OptItem "Deactivate Branch|e" "branch-deactivate"
|
||||
OptItem "Activate Branch in Master|M" "branch-master-activate"
|
||||
OptItem "Deactivate Branch in Master|v" "branch-master-deactivate"
|
||||
OptItem "Toggle Inversion|I" "branch-invert"
|
||||
OptItem "Add Unknown Branch|w" "branch-add"
|
||||
End
|
||||
|
||||
|
@ -465,6 +465,7 @@ enum FuncCode
|
||||
// 340
|
||||
LFUN_BUFFER_MOVE_PREVIOUS, // skostysh 20150408
|
||||
LFUN_TABULAR_FEATURE, // gm, 20151210
|
||||
LFUN_BRANCH_INVERT, // rgheck, 20160712
|
||||
LFUN_LASTACTION // end of the table
|
||||
};
|
||||
|
||||
|
@ -3641,6 +3641,15 @@ void LyXAction::init()
|
||||
{ LFUN_BRANCH_ADD, "branch-add", AtPoint, Buffer },
|
||||
|
||||
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_BRANCH_INVERT
|
||||
* \li Action: Toggles inversion status of branch inset.
|
||||
* \li Syntax: branch-invert
|
||||
* \li Origin: rgheck, 12 July 2016
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_BRANCH_INVERT, "branch-invert", AtPoint, Buffer },
|
||||
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_BRANCH_ACTIVATE
|
||||
* \li Action: Activate the branch.
|
||||
|
@ -188,6 +188,9 @@ void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LFUN_BRANCH_INVERT:
|
||||
params_.inverted = !params_.inverted;
|
||||
break;
|
||||
case LFUN_BRANCH_ADD:
|
||||
lyx::dispatch(FuncRequest(LFUN_BRANCH_ADD, params_.branch));
|
||||
break;
|
||||
@ -220,6 +223,10 @@ bool InsetBranch::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
flag.setEnabled(known_branch && !isBranchSelected(true));
|
||||
break;
|
||||
|
||||
case LFUN_BRANCH_INVERT:
|
||||
flag.setEnabled(true);
|
||||
break;
|
||||
|
||||
case LFUN_BRANCH_ADD:
|
||||
flag.setEnabled(!known_branch);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user