]> git.lyx.org Git - lyx.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>
Wed, 28 Dec 2016 15:34:44 +0000 (16:34 +0100)
commitc49cd699986175a5a76490e2109332ce8919eb59
tree5d5afb5dc7d53bc6254218f394d779be7f4c2398
parent750cbde62e6e9214b06a8537d65a202d1bfc9619
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