Commit Graph

21529 Commits

Author SHA1 Message Date
Richard Heck
3f62601a8f Fix bug discovered by Kornel. See
http://marc.info/?l=lyx-devel&m=138590578911716&w=2
If you look at Buffer.cpp, around line 4351, there was a comment about bug 5699. We are seeing the
same crash. The problem is that, although the master does have a GUI, that GUI is in a different window. So the structureChanged() call we do during updateBuffer() is for the TOC in that window, not the TOC in the window we are actually in. So our TocModel::toc_ has been reset and is invalid, though the widget itself has not been updated and looks fine.

This patch tests whether the master is in the same window as the buffer we are updating.

A problem remains, which is noted in a comment.
2014-01-29 11:23:03 -05:00
Kornel Benko
3369de6d7c Added test for algo2e tex2lyx conversion
Testfile from Jürgen Spitzmüller
2014-01-28 13:58:28 +01:00
Juergen Spitzmueller
f76a8c8ab1 tex2lyx: support algorithm2e (#8728) 2014-01-28 12:44:22 +01:00
Jean-Marc Lasgouttes
bab58480bc Do not skip space at start of row (fixes #8947, #8838)
TextMetrics::getColumnNearX (x -> pos translation) has special code to
ignore spaces at the beginning of a row, but neither the display code
nor TextMetrics::cursorX (pos->x translation) follow this logic. One
might argue that spaces should actually be ignored (like LaTeX does),
but this leads to UI issues and is probably too difficult to
implement.
2014-01-28 11:04:31 +01:00
Juergen Spitzmueller
ef5d702325 Harmonize naming 2014-01-27 12:04:58 +01:00
Juergen Spitzmueller
e6c5f9a17c Whitespace 2014-01-27 11:14:24 +01:00
Juergen Spitzmueller
5a3f1a731f Extend environment-split to an 'outer' split function
This fixes a major beamer UI flaw reported by several users.
2014-01-27 08:01:24 +01:00
Richard Heck
9d7f25a4ae Do not allow newlines in subfloats. Fixes #8752. 2014-01-26 14:23:40 -05:00
Juergen Spitzmueller
35e64bf951 Allow usage of algorithm2e package (#8744)
This simple module allows users to use the algorithm2e package at all. Before, it was not possible with LyX, since this package conflicts with LyX's own algorithm support (see also #8728)
2014-01-26 19:23:40 +01:00
Juergen Spitzmueller
2b941da7fc Fix longtable captions (#8933)
Don't know why this code is now needed again (or why it had to be removed in the first place).
2014-01-25 09:33:23 +01:00
Stephan Witt
01969e59fb #8932 improved spell checker debug messages 2014-01-15 21:20:05 +01:00
Scott Kostyshak
27131e655a Shortcut box now stays open if bad input (#8703)
This allows the user to correct the bad input without
having to enter the other fields again in a new dialog.

Patch from Martin Hoffmann.
2014-01-14 08:04:05 -05:00
Jean-Marc Lasgouttes
2a99afee94 Handle undo in `branch-add' LFUN 2014-01-13 17:32:32 +01:00
Kornel Benko
5efd59733a Remove warning 2014-01-05 10:04:23 +01:00
Stephan Witt
358e9ab31b fix Symbols dialog box grid size in case of broken QFontMetrics::maxWidth() 2014-01-04 20:14:06 +01:00
Enrico Forestieri
581400937d Fix file dialogs with Qt 5.2.0 and later.
See https://bugreports.qt-project.org/browse/QTBUG-34132

   * [QTBUG-34132] QFileDialog does no longer instantiate widgets if a
     native dialog will be used instead.  Therefore some accessors
     which previously returned unused objects will now return null.
     As before, you can set the DontUseNativeDialog option to ensure
     that widgets will be created and used instead.

Seemingly, Qt uses native dialogs by default starting from version 5.2.0.
When trying to open a file dialog, LyX segfaults in release mode, whereas
Qt asserts in debug mode:
ASSERT failure in QList<T>::at: "index out of range",
file /usr/local/qt/5.2.0/include/QtCore/qlist.h, line 472

This is avoided by explicitly setting the DontUseNativeDialog option
in the code path selected by *not* setting USE_NATIVE_FILEDIALOG.
This option was introduced in Qt 4.5, which is the minimum required
for compiling LyX. So, it is not protected by a preprocessor macro.
2013-12-24 17:21:56 +01:00
Juergen Spitzmueller
49d3557d0c Correct \file statement 2013-12-21 12:58:23 +01:00
Jean-Marc Lasgouttes
f7b0ecb64e Remove obsolete comment
It is not possible to make editXY const because of checkInsetHit, getPitNearY and getPitandRowNearY that modify the TextMetrics object.
2013-12-20 14:14:32 +01:00
Georg Baum
62a1dabcfc Fix typo 2013-12-15 12:19:12 +01:00
Juergen Spitzmueller
ed1ef9d740 Fix typo 2013-12-14 15:09:23 +01:00
Juergen Spitzmueller
0766f94ee0 Recognize changed babel error message (rewording) 2013-12-14 13:19:40 +01:00
Juergen Spitzmueller
3f9e644c25 Do not load the tipa package when fontspec is used
This was until now only cared of by the IPA inset, not by unicodesymbols.
2013-12-14 09:13:17 +01:00
Georg Baum
99cdabd206 Fix writer2latex quote handling (bug #8903)
writer2latex surrounds quotes by braces which we skip to avoid useless ERT.
I broke this in 25fe87e5 which made Parser::next_next_token() not recognize
that it needed to parse one more token. If we had a unit test for the Parser
class it would probably have detected that. Now we have at least a test for
the special quote.
2013-12-11 21:54:26 +01:00
Vincent van Ravesteijn
d1db30a188 Fix opening files from command line
Fixes: 9c4461de
2013-12-10 19:19:17 +01:00
Juergen Spitzmueller
740c247dfe Do not load the xunicode package with TeX fonts 2013-12-05 17:39:16 +01:00
Vincent van Ravesteijn
a4d881c58e Return an error on file-open only when a filename is given
Fixes: 9c4461de
2013-12-03 06:37:27 +01:00
Vincent van Ravesteijn
9c4461deea Return an error if file-open is called with a non-absolute path 2013-12-02 21:04:46 +01:00
Juergen Spitzmueller
027b5dc4af Rerun makeindex if all nomencl entries have been removed (#8905) 2013-12-02 14:36:18 +01:00
Juergen Spitzmueller
44df37ab2a Check if string holds absolute file name before passing to FileName
See http://comments.gmane.org/gmane.editors.lyx.cvs/38213http://comments.gmane.org/gmane.editors.lyx.cvs/38213
2013-12-02 09:50:21 +01:00
Georg Baum
08c5d34922 Make -userdir available to child processes
Otherwise tex2lyx would not find textclass.lst, and thus TeX import and
paste from LaTeX would not work.
2013-12-01 22:11:55 +01:00
Richard Heck
f8f1232465 Fix bug #8727: Text::breakParagraph() was always setting the default
layout, even if the paragraph in question requires plain layout.
2013-12-01 13:23:43 -05:00
Juergen Spitzmueller
b3a8abffc7 Load the CJK package if requested
The package was not loaded if a the main language was not CJK, the main encoding was non-default and the document had a secondary CJK language.
2013-12-01 10:57:36 +01:00
Juergen Spitzmueller
afab1140e9 Add a real Cancel button to 'Already Loaded' dialog box (part of #8787).
Also correlate the other buttons more explicitly to the question asked.
2013-11-28 17:06:49 +01:00
Juergen Spitzmueller
0445c8e08e Revert "Properly name Cancel button (part of #8787)"
This reverts commit aa5ef5bbbe.
2013-11-27 08:38:42 +01:00
Juergen Spitzmueller
aa5ef5bbbe Properly name Cancel button (part of #8787) 2013-11-26 16:16:24 +01:00
Juergen Spitzmueller
766e8b1e33 Also when not using tabs, do not open a file twice if already opened (part of #8787) 2013-11-26 16:12:52 +01:00
Richard Heck
460c80f851 Prettify the tooltip for footnotes. 2013-11-26 10:08:35 -05:00
Juergen Spitzmueller
cb699fbc1c Do not attempt to set default master if we already have a parent 2013-11-23 16:51:16 +01:00
Kornel Benko
805e51eff8 Implement file locking and apply to configure
Functions for file locking are added. They are used for ensuring that
for specified userdir only one LyX process runs configure.
2013-11-20 19:40:32 +01:00
Juergen Spitzmueller
dd739820d2 Set default to button which does _NOT_ discard data (part of #8787) 2013-11-18 15:06:32 +01:00
Juergen Spitzmueller
50bcd6ed7b Use the master buffer's param when compiling as a child (#8893) 2013-11-18 08:46:50 +01:00
Pavel Sanda
a3d685c16c Add Georg's comments from #8749. 2013-11-17 11:11:03 -08:00
Pavel Sanda
105f9bb5d9 Get rid of one useless translation.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181106.html
2013-11-17 10:41:18 -08:00
Juergen Spitzmueller
7e259c8d76 Do not reset custom space values if accessed via context menu (#8847) 2013-11-15 19:41:36 +01:00
Juergen Spitzmueller
c89ae3b517 Add missing widget update 2013-11-15 19:29:15 +01:00
Juergen Spitzmueller
e014f3fabf Some fixes to the SaveAs dialog
LFUN_BUFFER_SAVE_AS has an optional argument where an initial format can be preset

This fixes:

* The remainder of bug #3402: Open Export As dialog when attempting to export to read-only directories
* Bug #8886: 'export as' should default to the default document output format
2013-11-15 09:20:07 +01:00
Juergen Spitzmueller
ed268ac9f7 Clarify description 2013-11-15 08:57:11 +01:00
Juergen Spitzmueller
ab96df492a List all exportable document formats in the Save As dialog, not only the selection from the export menu 2013-11-15 08:56:13 +01:00
Scott Kostyshak
1e365fe315 Focus on custom line edit when custom is selected
Do so for the horizontal and vertical space dialogs.
2013-11-15 01:03:14 -05:00
Georg Baum
8eb8e49ebe Do not ignore literate programming errors 2013-11-14 21:04:37 +01:00