Skip to content

Commit d9dc0c8

Browse files
authored
Merge pull request #8793 from eder-matheus/odb_journal
odb: use setOrigin on dbJournal::undo_deleteObject for dbInstObj
2 parents 001ccd6 + cd919e6 commit d9dc0c8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/odb/src/db/dbJournal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1953,7 +1953,7 @@ void dbJournal::undo_deleteObject()
19531953
_log.pop(group_id);
19541954
_log.pop(module_id);
19551955
_log.pop(region_id);
1956-
inst->setLocation(x, y);
1956+
inst->setOrigin(x, y);
19571957
if (group_id != 0) {
19581958
auto group = dbGroup::getGroup(_block, group_id);
19591959
group->addInst(inst);

src/odb/test/cpp/TestJournal.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ TEST_F(JournalFixture, test_undo_inst_destroy)
4242
{
4343
auto module = dbModule::create(block, "m");
4444
auto inst = dbInst::create(block, and2, "a", false, module);
45+
inst->setOrigin(100, 200);
4546
// Ensure non-default values are restored
4647
inst->setPlacementStatus(dbPlacementStatus::PLACED);
4748
auto group = dbGroup::create(block, "g");
@@ -56,6 +57,7 @@ TEST_F(JournalFixture, test_undo_inst_destroy)
5657
EXPECT_EQ(inst->getGroup(), group);
5758
EXPECT_EQ(inst->getModule(), module);
5859
EXPECT_EQ(inst->getRegion(), region);
60+
EXPECT_EQ(inst->getLocation(), Point(100, 200));
5961
}
6062

6163
TEST_F(JournalFixture, test_undo_mod_inst_destroy)

0 commit comments

Comments
 (0)