summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-01-22 13:05:41 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2015-01-22 13:18:55 +0100
commit42b809228dc0971c4280871728e37261abab62da (patch)
tree691a1bf7883b3a5b7f27e1e07610d4f22782a49b
parent47bd9bd00edc9c0f2f4834a1b4869b45b65ab66a (diff)
On init of DbCellControl, load value from Model
This fixes a regression introduced by "fdo#88551 no need to update content from field when activating grid cell" that when switching from design mode to normal mode before one moved row at least once, the current cell (inevitably of the first row) was always displayed empty. Before, the update was done by the activation event (which was too often), so now we need to do it once at initialisation. Not sure if using updateFromModel instead of UpdateFromField makes a difference. Hope not. Else need to change that. Change-Id: I878dea0f91b370a4f83c3c1a3ed185a51ac9f0b7
-rw-r--r--svx/source/fmcomp/gridcell.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 739e6497bdbc..6ddf3d7a1119 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -919,6 +919,8 @@ void DbCellControl::Init( vcl::Window& rParent, const Reference< XRowSet >& _rxC
}
}
m_xCursor = _rxCursor;
+ if ( m_rColumn.getModel().is() )
+ updateFromModel( m_rColumn.getModel() );
}