]> git.lyx.org Git - features.git/commit
From c7899a30a0b5975bf599a69ecd11ab25e1cdf1a4 Mon Sep 17 00:00:00 2001
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 28 Dec 2016 15:34:44 +0000 (16:34 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 29 Dec 2016 07:39:34 +0000 (08:39 +0100)
commit5de448e132e6dabfca1ceee5b5b156200b36cea8
tree253a7c85b8a9421dd298035d9736c36b703691b9
parent2a4538ad5637aeb86f8699eeb816a3eeb9c6d2d8
From c7899a30a0b5975bf599a69ecd11ab25e1cdf1a4 Mon Sep 17 00:00:00 2001
From: "Joel A. Kulesza" <jkulesza@gmail.com>
Date: Mon, 24 Oct 2016 17:37:58 -0600
Subject: [PATCH] Add "Swap & Reverse" to math delimiter dialog

When "Keep matched" is unchecked, a button becomes enabled to "Swap &
Reverse" the left and right delimiters.  This is expected to be of use
with line-wrapped equations featuring one or more set of delimiters that
break across the lines.  When "Keep matched" is checked, the button is
visible but disabled.

The most common use case is expected to be the user entering a pair of
unmatched delimiters on the first line of an equation (e.g., "(" and
"(None)"), entering the inner text, going to the next line, and
inserting the opposite set of delimiters (e.g., "(None)" and ")").
This button will negate the need to find the correct corresponding
combination.  However, it relies on the dialog's memory of the previous
unmatched set.

This change addresses Ticket #10457

-----------

Modifications by spitz to the original patch:

* Only enable the button if an unmatched pair is selected
* Consider l7n when locating the string "(None)"
* Add an accelerator and a tooltip to the dialog
* Simplify the code a bit
src/frontends/qt4/GuiDelimiter.cpp
src/frontends/qt4/GuiDelimiter.h
src/frontends/qt4/ui/DelimiterUi.ui