[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kexi/plugins/tables
From:       Jaroslaw Staniek <js () iidea ! pl>
Date:       2004-11-18 23:26:56
Message-ID: 20041118232656.121B916E23 () office ! kde ! org
[Download RAW message or body]

CVS commit by staniek: 

Query Designer
- clearing "PK" flag is not needed in few cases

CCMAIL: jk@iidea.pl


  M +3 -1      kexialtertabledialog.cpp   1.76


--- koffice/kexi/plugins/tables/kexialtertabledialog.cpp  #1.75:1.76
@@ -359,4 +359,5 @@ void KexiAlterTableDialog::slotTogglePri
 void KexiAlterTableDialog::setPrimaryKey(KexiPropertyBuffer &buf, bool set)
 {
+        const bool was_pkey = buf["primaryKey"].value().toBool();
         buf["primaryKey"] = QVariant(set, 1);
         if (&buf==propertyBuffer()) {
@@ -369,4 +370,5 @@ void KexiAlterTableDialog::setPrimaryKey
                         m_view->data()->saveRowChanges(*m_view->selectedItem(), true);
                 }
+                if (was_pkey || set) //cahnge flag only if we're setting pk or really clearing it
                 d->primaryKeyExists = set;
         }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic