5467: Selected object after merger is not always merged object
svn: r18670
This commit is contained in:
parent
2fefd97642
commit
111cfce6fd
@ -165,11 +165,13 @@ class MergeEvents(ManagedWindow.ManagedWindow):
|
|||||||
if use_handle1:
|
if use_handle1:
|
||||||
phoenix = self.ev1
|
phoenix = self.ev1
|
||||||
titanic = self.ev2
|
titanic = self.ev2
|
||||||
unselect_path = (1,)
|
|
||||||
else:
|
else:
|
||||||
phoenix = self.ev2
|
phoenix = self.ev2
|
||||||
titanic = self.ev1
|
titanic = self.ev1
|
||||||
unselect_path = (0,)
|
# Add second handle to history so that when merge is complete,
|
||||||
|
# phoenix is the selected row.
|
||||||
|
self.uistate.viewmanager.active_page.get_history().push(
|
||||||
|
phoenix.get_handle())
|
||||||
|
|
||||||
if self.get_widget("type_btn1").get_active() ^ use_handle1:
|
if self.get_widget("type_btn1").get_active() ^ use_handle1:
|
||||||
phoenix.set_type(titanic.get_type())
|
phoenix.set_type(titanic.get_type())
|
||||||
@ -185,9 +187,6 @@ class MergeEvents(ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
query = MergeEventQuery(self.dbstate, phoenix, titanic)
|
query = MergeEventQuery(self.dbstate, phoenix, titanic)
|
||||||
query.execute()
|
query.execute()
|
||||||
if self.uistate.viewmanager.active_page.selection:
|
|
||||||
self.uistate.viewmanager.active_page.selection.unselect_path(
|
|
||||||
unselect_path)
|
|
||||||
self.uistate.set_busy_cursor(False)
|
self.uistate.set_busy_cursor(False)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
@ -197,11 +197,13 @@ class MergeFamilies(ManagedWindow.ManagedWindow):
|
|||||||
if use_handle1:
|
if use_handle1:
|
||||||
phoenix = self.fy1
|
phoenix = self.fy1
|
||||||
titanic = self.fy2
|
titanic = self.fy2
|
||||||
unselect_path = (1,)
|
|
||||||
else:
|
else:
|
||||||
phoenix = self.fy2
|
phoenix = self.fy2
|
||||||
titanic = self.fy1
|
titanic = self.fy1
|
||||||
unselect_path = (0,)
|
# Add second handle to history so that when merge is complete,
|
||||||
|
# phoenix is the selected row.
|
||||||
|
self.uistate.viewmanager.active_page.get_history().push(
|
||||||
|
phoenix.get_handle())
|
||||||
|
|
||||||
phoenix_fh = phoenix.get_father_handle()
|
phoenix_fh = phoenix.get_father_handle()
|
||||||
phoenix_mh = phoenix.get_mother_handle()
|
phoenix_mh = phoenix.get_mother_handle()
|
||||||
@ -221,9 +223,6 @@ class MergeFamilies(ManagedWindow.ManagedWindow):
|
|||||||
query.execute()
|
query.execute()
|
||||||
except MergeError, err:
|
except MergeError, err:
|
||||||
ErrorDialog( _("Cannot merge people"), str(err))
|
ErrorDialog( _("Cannot merge people"), str(err))
|
||||||
if self.uistate.viewmanager.active_page.selection:
|
|
||||||
self.uistate.viewmanager.active_page.selection.unselect_path(
|
|
||||||
unselect_path)
|
|
||||||
self.uistate.set_busy_cursor(False)
|
self.uistate.set_busy_cursor(False)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
@ -147,11 +147,13 @@ class MergeMediaObjects(ManagedWindow.ManagedWindow):
|
|||||||
if use_handle1:
|
if use_handle1:
|
||||||
phoenix = self.mo1
|
phoenix = self.mo1
|
||||||
titanic = self.mo2
|
titanic = self.mo2
|
||||||
unselect_path = (1,)
|
|
||||||
else:
|
else:
|
||||||
phoenix = self.mo2
|
phoenix = self.mo2
|
||||||
titanic = self.mo1
|
titanic = self.mo1
|
||||||
unselect_path = (0,)
|
# Add second handle to history so that when merge is complete,
|
||||||
|
# phoenix is the selected row.
|
||||||
|
self.uistate.viewmanager.active_page.get_history().push(
|
||||||
|
phoenix.get_handle())
|
||||||
|
|
||||||
if self.get_widget("path_btn1").get_active() ^ use_handle1:
|
if self.get_widget("path_btn1").get_active() ^ use_handle1:
|
||||||
phoenix.set_path(titanic.get_path())
|
phoenix.set_path(titanic.get_path())
|
||||||
@ -165,9 +167,6 @@ class MergeMediaObjects(ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
query = MergeMediaQuery(self.dbstate, phoenix, titanic)
|
query = MergeMediaQuery(self.dbstate, phoenix, titanic)
|
||||||
query.execute()
|
query.execute()
|
||||||
if self.uistate.viewmanager.active_page.selection:
|
|
||||||
self.uistate.viewmanager.active_page.selection.unselect_path(
|
|
||||||
unselect_path)
|
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
class MergeMediaQuery(object):
|
class MergeMediaQuery(object):
|
||||||
|
@ -158,11 +158,13 @@ class MergeNotes(ManagedWindow.ManagedWindow):
|
|||||||
if use_handle1:
|
if use_handle1:
|
||||||
phoenix = self.no1
|
phoenix = self.no1
|
||||||
titanic = self.no2
|
titanic = self.no2
|
||||||
unselect_path = (1,)
|
|
||||||
else:
|
else:
|
||||||
phoenix = self.no2
|
phoenix = self.no2
|
||||||
titanic = self.no1
|
titanic = self.no1
|
||||||
unselect_path = (0,)
|
# Add second handle to history so that when merge is complete,
|
||||||
|
# phoenix is the selected row.
|
||||||
|
self.uistate.viewmanager.active_page.get_history().push(
|
||||||
|
phoenix.get_handle())
|
||||||
|
|
||||||
if self.get_widget("text_btn1").get_active() ^ use_handle1:
|
if self.get_widget("text_btn1").get_active() ^ use_handle1:
|
||||||
phoenix.set_styledtext(titanic.get_styledtext())
|
phoenix.set_styledtext(titanic.get_styledtext())
|
||||||
@ -175,9 +177,6 @@ class MergeNotes(ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
query = MergeNoteQuery(self.dbstate, phoenix, titanic)
|
query = MergeNoteQuery(self.dbstate, phoenix, titanic)
|
||||||
query.execute()
|
query.execute()
|
||||||
if self.uistate.viewmanager.active_page.selection:
|
|
||||||
self.uistate.viewmanager.active_page.selection.unselect_path(
|
|
||||||
unselect_path)
|
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -308,11 +308,13 @@ class MergePeople(ManagedWindow.ManagedWindow):
|
|||||||
if use_handle1:
|
if use_handle1:
|
||||||
phoenix = self.pr1
|
phoenix = self.pr1
|
||||||
titanic = self.pr2
|
titanic = self.pr2
|
||||||
unselect_path = (1,)
|
|
||||||
else:
|
else:
|
||||||
phoenix = self.pr2
|
phoenix = self.pr2
|
||||||
titanic = self.pr1
|
titanic = self.pr1
|
||||||
unselect_path = (0,)
|
# Add second handle to history so that when merge is complete,
|
||||||
|
# phoenix is the selected row.
|
||||||
|
self.uistate.viewmanager.active_page.get_history().push(
|
||||||
|
phoenix.get_handle())
|
||||||
|
|
||||||
if self.get_widget("name_btn1").get_active() ^ use_handle1:
|
if self.get_widget("name_btn1").get_active() ^ use_handle1:
|
||||||
swapname = phoenix.get_primary_name()
|
swapname = phoenix.get_primary_name()
|
||||||
@ -330,9 +332,6 @@ class MergePeople(ManagedWindow.ManagedWindow):
|
|||||||
query.execute()
|
query.execute()
|
||||||
except MergeError, err:
|
except MergeError, err:
|
||||||
ErrorDialog( _("Cannot merge people"), str(err))
|
ErrorDialog( _("Cannot merge people"), str(err))
|
||||||
if self.uistate.viewmanager.active_page.selection:
|
|
||||||
self.uistate.viewmanager.active_page.selection.unselect_path(
|
|
||||||
unselect_path)
|
|
||||||
self.uistate.set_busy_cursor(False)
|
self.uistate.set_busy_cursor(False)
|
||||||
self.close()
|
self.close()
|
||||||
if self.update:
|
if self.update:
|
||||||
|
@ -169,11 +169,14 @@ class MergePlaces(ManagedWindow.ManagedWindow):
|
|||||||
if use_handle1:
|
if use_handle1:
|
||||||
phoenix = self.pl1
|
phoenix = self.pl1
|
||||||
titanic = self.pl2
|
titanic = self.pl2
|
||||||
unselect_path = (1,)
|
|
||||||
else:
|
else:
|
||||||
phoenix = self.pl2
|
phoenix = self.pl2
|
||||||
titanic = self.pl1
|
titanic = self.pl1
|
||||||
unselect_path = (0,)
|
# Add second handle to history so that when merge is complete,
|
||||||
|
# phoenix is the selected row.
|
||||||
|
self.uistate.viewmanager.active_page.get_history().push(
|
||||||
|
phoenix.get_handle())
|
||||||
|
|
||||||
|
|
||||||
if self.get_widget("title_btn1").get_active() ^ use_handle1:
|
if self.get_widget("title_btn1").get_active() ^ use_handle1:
|
||||||
phoenix.set_title(titanic.get_title())
|
phoenix.set_title(titanic.get_title())
|
||||||
@ -190,9 +193,6 @@ class MergePlaces(ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
query = MergePlaceQuery(self.dbstate, phoenix, titanic)
|
query = MergePlaceQuery(self.dbstate, phoenix, titanic)
|
||||||
query.execute()
|
query.execute()
|
||||||
if self.uistate.viewmanager.active_page.selection:
|
|
||||||
self.uistate.viewmanager.active_page.selection.unselect_path(
|
|
||||||
unselect_path)
|
|
||||||
self.uistate.set_busy_cursor(False)
|
self.uistate.set_busy_cursor(False)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
@ -136,11 +136,13 @@ class MergeRepositories(ManagedWindow.ManagedWindow):
|
|||||||
if use_handle1:
|
if use_handle1:
|
||||||
phoenix = self.rp1
|
phoenix = self.rp1
|
||||||
titanic = self.rp2
|
titanic = self.rp2
|
||||||
unselect_path = (1,)
|
|
||||||
else:
|
else:
|
||||||
phoenix = self.rp2
|
phoenix = self.rp2
|
||||||
titanic = self.rp1
|
titanic = self.rp1
|
||||||
unselect_path = (0,)
|
# Add second handle to history so that when merge is complete,
|
||||||
|
# phoenix is the selected row.
|
||||||
|
self.uistate.viewmanager.active_page.get_history().push(
|
||||||
|
phoenix.get_handle())
|
||||||
|
|
||||||
if self.get_widget("name_btn1").get_active() ^ use_handle1:
|
if self.get_widget("name_btn1").get_active() ^ use_handle1:
|
||||||
phoenix.set_name(titanic.get_name())
|
phoenix.set_name(titanic.get_name())
|
||||||
@ -151,9 +153,6 @@ class MergeRepositories(ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
query = MergeRepoQuery(self.dbstate, phoenix, titanic)
|
query = MergeRepoQuery(self.dbstate, phoenix, titanic)
|
||||||
query.execute()
|
query.execute()
|
||||||
if self.uistate.viewmanager.active_page.selection:
|
|
||||||
self.uistate.viewmanager.active_page.selection.unselect_path(
|
|
||||||
unselect_path)
|
|
||||||
self.uistate.set_busy_cursor(False)
|
self.uistate.set_busy_cursor(False)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
@ -159,11 +159,13 @@ class MergeSources(ManagedWindow.ManagedWindow):
|
|||||||
if use_handle1:
|
if use_handle1:
|
||||||
phoenix = self.src1
|
phoenix = self.src1
|
||||||
titanic = self.src2
|
titanic = self.src2
|
||||||
unselect_path = (1,)
|
|
||||||
else:
|
else:
|
||||||
phoenix = self.src2
|
phoenix = self.src2
|
||||||
titanic = self.src1
|
titanic = self.src1
|
||||||
unselect_path = (0,)
|
# Add second handle to history so that when merge is complete,
|
||||||
|
# phoenix is the selected row.
|
||||||
|
self.uistate.viewmanager.active_page.get_history().push(
|
||||||
|
phoenix.get_handle())
|
||||||
|
|
||||||
if self.get_widget("title_btn1").get_active() ^ use_handle1:
|
if self.get_widget("title_btn1").get_active() ^ use_handle1:
|
||||||
phoenix.set_title(titanic.get_title())
|
phoenix.set_title(titanic.get_title())
|
||||||
@ -178,9 +180,6 @@ class MergeSources(ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
query = MergeSourceQuery(self.dbstate, phoenix, titanic)
|
query = MergeSourceQuery(self.dbstate, phoenix, titanic)
|
||||||
query.execute()
|
query.execute()
|
||||||
if self.uistate.viewmanager.active_page.selection:
|
|
||||||
self.uistate.viewmanager.active_page.selection.unselect_path(
|
|
||||||
unselect_path)
|
|
||||||
self.uistate.set_busy_cursor(False)
|
self.uistate.set_busy_cursor(False)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user