Commit Graph

20131 Commits

Author SHA1 Message Date
Juergen Spitzmueller
0a61ff1342 Set cursor pos after cursor idx to avoid invalid cursor.
Fixes: #9076
2014-04-04 16:28:21 +02:00
Richard Heck
e31e254e7e Fix problem with backport 0fc6cfcd.
The --binary-dir option does not exist in branch.
2014-03-25 11:01:14 -04:00
Juergen Spitzmueller
c06c1c3195 In Paragraph::changeCase, correctly track the font of the changed characters (fix crash)
Fixes: #7943
2014-03-24 16:21:20 +01:00
Juergen Spitzmueller
2c88e6ab2f Do not allow the manual insertion of a directory (without filename) into the import dialog and thus prevent an assertion.
Fixes: #7437(cherry picked from commit afd897029917a083fbeb84cccd4e6cb0a21db7ed)
2014-03-23 19:00:15 -04:00
Juergen Spitzmueller
6979ec6818 style 2014-03-23 11:23:06 +01:00
Juergen Spitzmueller
0cad43a114 Fix assertion when ChkTeX hit math.
The problem here was that we used texted-only methods (via paragraph()), which triggered the assertion as soon as we were inside math.

Fixes: #8798
2014-03-23 11:21:06 +01:00
Juergen Spitzmueller
aceb9d9f29 Do not crash when entering math in ct mode with merge dialog open.
Fixes: #7685.
2014-03-23 10:45:58 +01:00
Juergen Spitzmueller
1c35155810 Fix selection drawing after mouse-double/triple in mathed
Fixes: #8829
2014-03-23 10:35:36 +01:00
Juergen Spitzmueller
e6af49a9f5 InsetListings: Rewrite C-ism in C++ and fix terminator bug.
The rewriting is completely done by JMarc. The terminator bug fix has been added to that by me.

Fixes: #8985
Conflicts:
	src/insets/InsetListings.cpp
2014-03-23 10:24:53 +01:00
Scott Kostyshak
c56fc4c5f4 Focus on buffer after section select in Outliner 2014-03-23 10:03:26 +01:00
Juergen Spitzmueller
a62cfc6024 Fix section-select when issued from outliner
Fixes: #8936
2014-03-23 10:02:17 +01:00
Benjamin Piwowarski
bfb6d68447 Avoids const_cast in configure_command by using mutable 2014-03-22 10:03:41 +01:00
Benjamin Piwowarski
0fc6cfcdcb Fix problem with python and change of PATH
- waits that lyxrc has been read before finding python
- when the PATH changes, resets the value
2014-03-22 09:36:19 +01:00
Jean-Marc Lasgouttes
e72b3f8e3e Fix bug #8837: LyX hangs on selection
The code that checks whether the cursor was at the end of a row in
Cursor::upDowninText was not able to set boundary correctly. This
causes a hang in because the cursor got stuck on a line and there is an
infinite loop BufferView::dispatch when trying to go down.

The fix is to avoid using the watered-down TextMetrics::x2pos wrapper
around getColumnNearX and use the real thing instead.

Eventually, the last user of x2pos (InsetTabular) should be fixed and
the method should go away.
2014-03-19 17:15:00 +01:00
Jean-Marc Lasgouttes
191d44a557 Fix bug #8884: Crash when "navigate to next change"
The two fixes here a obviously right, although it is not clear why they are sufficient to fix the bug. Anyway I cannot reproduce any crash with it.

 * the first part just conditions a whole if/else to change_next_pos.changed(). Originally, only the if branch was concerned.

 * the second part is to avoid calling CursorSlice::backwardPos() when position is 0. Doing this leads to an assertion.
2014-03-04 10:25:32 +01:00
Jean-Marc Lasgouttes
5c0cf4cc51 Fix bug #8998: changed document setting is recoded twice as undo
The general trick to avoid this kind of problems is to use undo groups.
2014-03-04 10:06:37 +01:00
Juergen Spitzmueller
3f317d1f2d Fix compilation after 4277e8b733 2014-02-26 17:20:30 +01:00
Richard Heck
4277e8b733 Table cells are insets, but not from the point of view of DocIterators
and Cursors. So just calling InsetText::addToToc for the cells causes
problems, because InsetText::addToToc then adds the cell inset itself
as part of the DocIterator. This then leads to assertions, such as bug

The solution is to refactor InsetText::addToToc so that we can call the
iterating part without adding the inset.
(cherry picked from commit 6a85db2307)
2014-02-26 10:37:05 -05:00
Georg Baum
c7596ec4b2 Fix bug #8784 (mathml export for scripts)
For displaystyle scripts we need to use munder, mover or munderover.
2014-02-22 19:18:16 +01:00
Enrico Forestieri
64be8c6553 Fix bug #8889 by always issuing \protect in fragile environments.
(cherry picked from commit 3c1969574f)
2014-02-22 10:35:07 -05:00
Georg Baum
e09faf7ce6 Fix bug #8891 (wrong depth of copied text)
This was an obvious thinko: When pasting a paragraph list the depth of the
pasted paragraphs need to be adjusted, so that no paragraph has a negative
depth afterwards. However, the maximum allowed depth was only adjusted after
the second and following pasted paragraphs. Since the computed value was only
used for the subsequent paragrph this meant that the second paragraph did
still use the same maximum allowed depth as the first one, which came from the
paragraph the text as pasted into. This was wrong e.g. in case the outside
paragraph was a standard paragraph (max_depth = 0), and the first pasted
paragraph was an enumeration (max_depth = 1). Therefore, max_depth needs to
be adjusted also after the first pasted paragaph. Since the adjustment is
done aftre max_depth was used for the current paragraph the condition
mentioned in the comment is still met.
(cherry picked from commit 270201ed67)
2014-02-22 10:21:34 -05:00
Jean-Marc Lasgouttes
a5cab01a9f Fix bug 6055: change-next does not work in tables
The problem was just the faulty use of CursorSlice::at_begin/end(), which does not look for end of cell, but end of inset.
(cherry picked from commit 68202fdf44)
2014-02-19 09:36:27 -05:00
Juergen Spitzmueller
aba0b41fdc Handle is_child runparam in preview (bug #8445)
(cherry picked from commit 1ace930f7d)
2014-02-19 09:25:41 -05:00
Richard Heck
9e9e02d285 Fix bug #8540 by not resetting the GUI if the request came from
the minibuffer. As the comments explain, this leaves a different
bug, but (a) it isn't a crash and (b) it probably won't affect
many users, if *any* users.
(cherry picked from commit 7220f1459e)
2014-02-18 11:03:46 -05:00
Scott Kostyshak
2ec8880e47 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.
(cherry picked from commit 27131e655a)

Conflicts:
	lib/generate_contributions.py
2014-02-13 18:07:13 -05:00
Richard Heck
6d63895887 Fix bug #8944 by introducing a maximum size for keys we process.
Backported from b7a1eb68e1.
2014-02-13 18:01:41 -05:00
Juergen Spitzmueller
6a3ef6a134 Do not crash with empty (invalid) math environments (part of #8359) 2014-02-10 19:25:57 +01:00
Juergen Spitzmueller
adc78fac32 Fix LFUN_MATH_AMS_MATRIX: it was possible to generate corrupt documents (part of #8359) 2014-02-10 19:22:49 +01:00
Juergen Spitzmueller
07baa69875 Do not issue module warnings when just cloning a buffer (#8864) 2014-02-10 08:40:35 +01:00
Juergen Spitzmueller
8431f55f73 Rerun makeindex if all nomencl entries have been removed (#8905) 2014-02-10 07:47:47 +01:00
Uwe Stöhr
401d87f1a3 lyx2lyx/Preamble.cpp: fix bug 8723 also for branch 2014-02-09 23:23:51 +01:00
Uwe Stöhr
5726535d96 BufferParams.cpp: fix bug #8613 also for branch 2014-02-09 23:17:38 +01:00
Juergen Spitzmueller
b6b1ab890d Rerun makeindex if all nomencl entries have been removed (#8905) 2014-02-09 14:00:05 +01:00
Vincent van Ravesteijn
ea6f56d564 Compare: Add the authors from the 'other' document
Otherwise the resulting document may contain references to authors that are not present in the author list, which results in a crash.

Fixes-bug: #8769
2014-02-07 23:54:41 +01:00
Vincent van Ravesteijn
1f13491f06 Return true to indicate we might have invalidated the cursor
If we don't do so, Cursor::notifyCursorLeavesOrEnters might continue with
an invalidated cursor.

Fixes-bug: #8329
2014-02-07 23:54:32 +01:00
Vincent van Ravesteijn
e8242cbee6 Do not try to track_change an auto-deleted bibitem
We are not capable of handling two bibitems within one biblio paragraph.
That's why we have functions like Paragraph::brokenBiblio() and
Paragraph::fixBiblio(). So, if we fix the biblio by deleting the second
bibitem, we should not keep it as deleted.

This code caused a crash because the inset was released, but still kept as
deleted.

Fixes-bug: #8646.
2014-02-07 23:54:21 +01:00
Vincent van Ravesteijn
a6fce04f39 Fix wrong painting of lines right of multicol
We should skip the other cells that are part of the multicolumn before we find the cell right to the current one.

Fixes-bug: #8082
2014-02-07 23:23:02 +01:00
Stephan Witt
00a7f002db Fix the missing dynamic menus in general and restore correctly from fullscreen. 2014-01-29 19:20:01 +01:00
Jean-Marc Lasgouttes
d187be8205 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.
(cherry picked from commit bab58480bc)
2014-01-29 11:38:45 -05:00
Richard Heck
8c07f7fcc0 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.

(cherry picked from commit 3f62601a8f)

Conflicts:
	src/Buffer.cpp
2014-01-29 11:35:48 -05:00
Jean-Marc Lasgouttes
75bab51a8a Fix a couple of compilation warnings 2014-01-28 12:08:35 +01:00
Jean-Marc Lasgouttes
a01c0e495f Handle undo in `branch-add' LFUN
Backport of 2a99afee94.
2014-01-28 11:48:49 +01:00
Stephan Witt
535c9ea078 Override QMainWindow::menuBar() in LyX GuiView class on Mac OSX.
This fixes the issue with missing menu entry for "Insert Branch <branch name>".
2014-01-26 18:40:23 +01:00
Richard Heck
a9f9c1bc6e Add comment. 2014-01-24 12:41:22 -05:00
Stephan Witt
5a5d6a524c Work around a bug with crash on view close on Mac OSX.
See also https://bugreports.qt-project.org/browse/QTBUG-25399
It improves the situation with LyX ticket #8063 and fixes #8062 for Cocoa builds
2014-01-20 21:22:59 +01:00
Stephan Witt
85bd5428cb back port from trunk:
fix Symbols dialog box grid size in case of broken QFontMetrics::maxWidth()
2014-01-04 20:37:38 +01:00
Richard Heck
4f09c28bdd Fix bug #8727: Text::breakParagraph() was always setting the default
layout, even if the paragraph in question requires plain layout.
(cherry picked from commit f8f1232465)
2013-12-01 13:29:45 -05:00
Juergen Spitzmueller
5318d2fa7d Fix crash when using context menu in empty outliner
Fixes: #8885
2013-11-16 11:19:11 +01:00
Juergen Spitzmueller
596b9f8607 Fix shortcut clash (bug #8878)
Patch by charley
2013-11-12 16:37:33 +01:00
Juergen Spitzmueller
52fe53676a fix macro order for newsubfloat 2013-10-13 11:49:29 +02:00