]> git.lyx.org Git - features.git/commit
GuiSymbols: Better handling of empty blocks
authorGuillaume Munch <gm@lyx.org>
Sat, 3 Dec 2016 22:35:15 +0000 (23:35 +0100)
committerGuillaume Munch <gm@lyx.org>
Sat, 3 Dec 2016 22:35:15 +0000 (23:35 +0100)
commitee0e95aafb99bbc29818f95b7654c9a3a72f167b
tree15de7905e49d6c172c675c52bebcef4450116225
parenta19be0314b3ed7be39088a6ae571fed1785f516b
GuiSymbols: Better handling of empty blocks

* endInsertRow was incorrectly placed before endResetModel, sometimes leading to
  bad access by the view before it was informed that the model was empty. In
  fact begin/endInsertRows were redundant with begin/endResetModel.

* Empty blocks are not supposed to be shown. This happened when moving the
  cursor. A valid block is now selected intead. Due to the design/optimisation
  of the model update, this requires a first update with an empty
  model. Simplify the old code.
src/frontends/qt4/GuiSymbols.cpp