Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
ecbbb898
Commit
ecbbb898
authored
Nov 09, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorder contacts after editing if display name changed
parent
49819437
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
contacts.py
blink/contacts.py
+5
-3
No files found.
blink/contacts.py
View file @
ecbbb898
...
...
@@ -1197,12 +1197,14 @@ class ContactModel(QAbstractListModel):
@
updates_contacts_db
def
updateContact
(
self
,
contact
,
attributes
):
group
=
attributes
.
pop
(
'group'
)
for
name
,
value
in
attributes
.
iteritems
():
setattr
(
contact
,
name
,
value
)
if
contact
.
group
!=
group
:
name
=
attributes
.
pop
(
'name'
)
for
attr
,
value
in
attributes
.
iteritems
():
setattr
(
contact
,
attr
,
value
)
if
contact
.
name
!=
name
or
contact
.
group
!=
group
:
new_group
=
group
not
in
self
.
items
self
.
_pop_contact
(
contact
)
contact
.
group
=
group
contact
.
name
=
name
self
.
_add_contact
(
contact
)
if
new_group
:
self
.
itemsAdded
.
emit
([
group
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment