summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-07-15 19:47:18 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-20 14:13:31 +0200
commit89cf1ab14f3a9421f79a7da8a5110f380c24d372 (patch)
tree77e666e253883868efe294b1c9ace735e3d1389a /svtools
parent97db86f453462eed47d50c3f4702b227fdc0b3ec (diff)
Remove harmful ill-timed CellController disable on mouse button down
This disable will be done, in a better way, by the call to BrowseBox::MouseButtonDown below, *after* the destination of the mouse click has grabbed the focus, by a call to DeactivateCell(). If this is done here, while the "source" controller still has the focus, then the window's Disable() method will try to pass the focus the the "next control". However, the "next" control may belong to another form, and this will do a (premature!) save to the database of the modifications. This may lead to a database error, when the data is not in a shape to be written to the database, e.g. when on an insertion row and not all mandatory fields have been filled in. This then pops up an error message to the user. Change-Id: I38b1850319691b34232e51f131f8d099dc4a9114 Reviewed-on: https://gerrit.libreoffice.org/17270 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx10
1 files changed, 0 insertions, 10 deletions
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 56155ddce018..d0c8d530e7c7 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -482,20 +482,10 @@ namespace svt
void EditBrowseBox::MouseButtonDown(const BrowserMouseEvent& rEvt)
{
- sal_uInt16 nColPos = GetColumnPos( rEvt.GetColumnId() );
- long nRow = rEvt.GetRow();
-
// absorb double clicks
if (rEvt.GetClicks() > 1 && rEvt.GetRow() >= 0)
return;
- // change to a new position
- if (IsEditing() && (nColPos != nEditCol || nRow != nEditRow) && (nColPos != BROWSER_INVALIDID) && (nRow < GetRowCount()))
- {
- CellControllerRef aCellController(Controller());
- HideAndDisable(aCellController);
- }
-
// we are about to leave the current cell. If there is a "this cell has been modified" notification
// pending (asynchronously), this may be deadly -> do it synchronously
if ( nCellModifiedEvent )