glom r1940 - in trunk: . glom/mode_design/fields
- From: arminb svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1940 - in trunk: . glom/mode_design/fields
- Date: Fri, 27 Feb 2009 12:06:27 +0000 (UTC)
Author: arminb
Date: Fri Feb 27 12:06:27 2009
New Revision: 1940
URL: http://svn.gnome.org/viewvc/glom?rev=1940&view=rev
Log:
2009-02-27 Armin Burgmeier <armin openismus com>
* glom/mode_design/fields/box_db_table_definition.cc (on_adddel_add):
Add newly added field into document before refreshing m_vecFields, so
that Base_DB::get_fields_for_table() has an up-to-date document. This
fixes changing newly added fields with SQLite.
* configure.in: Fixed a typo, which caused libgda-sqlite-4.0 not being
required even when SQLite support was enabled.
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/glom/mode_design/fields/box_db_table_definition.cc
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Fri Feb 27 12:06:27 2009
@@ -112,7 +112,7 @@
fi
if test "$enable_sqlite" = "yes"; then
- REQIRED_LIBS="$REQUIRED_LIBS libgda-sqlite-4.0"
+ REQUIRED_LIBS="$REQUIRED_LIBS libgda-sqlite-4.0"
fi
# Checks for libraries
Modified: trunk/glom/mode_design/fields/box_db_table_definition.cc
==============================================================================
--- trunk/glom/mode_design/fields/box_db_table_definition.cc (original)
+++ trunk/glom/mode_design/fields/box_db_table_definition.cc Fri Feb 27 12:06:27 2009
@@ -182,16 +182,6 @@
const bool bTest = add_column(m_table_name, field, get_app_window()); //TODO: Get schema type for Field::TYPE_NUMERIC
if(bTest)
{
- //Show the new field (fill in the other cells):
-
- //Update our list of database fields.
- //update_gda_metastore_for_table(m_table_name); // already done by add_column()
- fill_fields();
-
- //fill_from_database(); //We cannot change the structure in a cell renderer signal handler.
-
- fill_field_row(row, field);
-
//Store the generated title in the document:
//on_adddel_changed(row, m_colTitle);
@@ -202,11 +192,25 @@
Document_Glom* pDoc = static_cast<Document_Glom*>(get_document());
if(pDoc)
{
+ std::cout << field->get_glom_type() << std::endl;
Document_Glom::type_vecFields vecFields = pDoc->get_table_fields(m_table_name);
vecFields.push_back(field);
pDoc->set_table_fields(m_table_name, vecFields);
}
+ // Do this after having added the new field to the document, so
+ // Base_DB::get_fields_for_table() can use it to compare the fields from
+ // the database against.
+
+ //Show the new field (fill in the other cells):
+
+ //Update our list of database fields.
+ fill_fields();
+
+ //fill_from_database(); //We cannot change the structure in a cell renderer signal handler.
+
+ fill_field_row(row, field);
+
m_AddDel.select_item(field->get_name(), m_colName, false);
//m_AddDel.select_item(row, m_colTitle, true); //Start editing the title
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]