Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
cf813a99
Commit
cf813a99
authored
Mar 01, 2009
by
Claes pwr46/data0/x4-6-0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge journal bugfix for deleted object with open attribute editor
parent
da899ee8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
120 additions
and
0 deletions
+120
-0
xtt/lib/ge/src/ge_graph_journal.cpp
xtt/lib/ge/src/ge_graph_journal.cpp
+120
-0
No files found.
xtt/lib/ge/src/ge_graph_journal.cpp
View file @
cf813a99
...
...
@@ -558,6 +558,9 @@ int GraphJournal::redo()
printf
(
"Redo idx: %3d list: %3d undo: %10d redo: %10d
\n
"
,
current_idx
,
poslist
.
size
()
-
1
,
(
int
)
poslist
[
current_idx
].
undo_pos
,
(
int
)
poslist
[
current_idx
].
redo_pos
);
if
(
poslist
[
current_idx
].
redo_pos
==
-
1
)
return
0
;
fp
.
seekp
(
poslist
[
current_idx
].
redo_pos
);
fp
.
getline
(
line
,
sizeof
(
line
));
...
...
@@ -629,6 +632,9 @@ int GraphJournal::undo_delete_select()
grow_tObject
prev
;
int
sts
;
if
(
debug
>=
2
)
printf
(
"undo_delete_select
\n
"
);
grow_SetNodraw
(
graph
->
grow
->
ctx
);
fp
.
getline
(
line
,
sizeof
(
line
));
...
...
@@ -669,6 +675,9 @@ int GraphJournal::store_undo_delete_select()
int
sts
;
char
name
[
80
];
if
(
debug
>=
2
)
printf
(
"store_undo_delete_select
\n
"
);
grow_GetSelectList
(
graph
->
grow
->
ctx
,
&
sel_list
,
&
sel_count
);
for
(
int
i
=
sel_count
-
1
;
i
>=
0
;
i
--
)
{
fp
<<
journal_cTag_Object
<<
endl
;
...
...
@@ -693,6 +702,9 @@ int GraphJournal::store_redo_delete_select()
grow_tObject
*
sel_list
;
int
sel_count
;
if
(
debug
>=
2
)
printf
(
"store_redo_delete_select
\n
"
);
grow_GetSelectList
(
graph
->
grow
->
ctx
,
&
sel_list
,
&
sel_count
);
for
(
int
i
=
0
;
i
<
sel_count
;
i
++
)
{
grow_GetObjectName
(
sel_list
[
i
],
name
);
...
...
@@ -713,6 +725,9 @@ int GraphJournal::redo_delete_select()
char
line
[
100
];
int
tag
;
if
(
debug
>=
2
)
printf
(
"redo_delete_select
\n
"
);
grow_SetNodraw
(
graph
->
grow
->
ctx
);
fp
.
getline
(
line
,
sizeof
(
line
));
...
...
@@ -741,6 +756,9 @@ int GraphJournal::undo_delete_object()
{
grow_tObject
o
;
if
(
debug
>=
2
)
printf
(
"undo_delete_select
\n
"
);
grow_ObjectRead
(
graph
->
grow
->
ctx
,
(
ifstream
&
)
fp
,
&
o
);
grow_Redraw
(
graph
->
grow
->
ctx
);
return
GE__SUCCESS
;
...
...
@@ -748,6 +766,9 @@ int GraphJournal::undo_delete_object()
int
GraphJournal
::
store_undo_delete_object
(
grow_tObject
o
)
{
if
(
debug
>=
2
)
printf
(
"store_undo_delete_object
\n
"
);
grow_ObjectSave
(
o
,
(
ofstream
&
)
fp
,
glow_eSaveMode_Edit
);
return
GE__SUCCESS
;
}
...
...
@@ -756,6 +777,9 @@ int GraphJournal::store_redo_delete_object( grow_tObject o)
{
char
name
[
80
];
if
(
debug
>=
2
)
printf
(
"store_redo_delete_object
\n
"
);
grow_GetObjectName
(
o
,
name
);
fp
<<
name
<<
endl
;
...
...
@@ -768,6 +792,9 @@ int GraphJournal::redo_delete_object()
grow_tObject
o
;
int
sts
;
if
(
debug
>=
2
)
printf
(
"redo_delete_object
\n
"
);
fp
.
getline
(
name
,
sizeof
(
name
));
sts
=
grow_FindObjectByName
(
graph
->
grow
->
ctx
,
name
,
&
o
);
...
...
@@ -783,6 +810,9 @@ int GraphJournal::undo_create_object()
grow_tObject
o
;
int
sts
;
if
(
debug
>=
2
)
printf
(
"undo_create_object
\n
"
);
fp
.
getline
(
name
,
sizeof
(
name
));
sts
=
grow_FindObjectByName
(
graph
->
grow
->
ctx
,
name
,
&
o
);
...
...
@@ -796,6 +826,9 @@ int GraphJournal::store_undo_create_object( grow_tObject o)
{
char
name
[
80
];
if
(
debug
>=
2
)
printf
(
"store_undo_create_object
\n
"
);
grow_GetObjectName
(
o
,
name
);
fp
<<
name
<<
endl
;
...
...
@@ -806,6 +839,9 @@ int GraphJournal::redo_create_object()
{
grow_tObject
o
;
if
(
debug
>=
2
)
printf
(
"redo_create_object
\n
"
);
grow_ObjectRead
(
graph
->
grow
->
ctx
,
(
ifstream
&
)
fp
,
&
o
);
check_object_number
(
o
);
grow_Redraw
(
graph
->
grow
->
ctx
);
...
...
@@ -814,6 +850,9 @@ int GraphJournal::redo_create_object()
int
GraphJournal
::
store_redo_create_object
(
grow_tObject
o
)
{
if
(
debug
>=
2
)
printf
(
"store_redo_create_object
\n
"
);
grow_ObjectSave
(
o
,
(
ofstream
&
)
fp
,
glow_eSaveMode_Edit
);
return
GE__SUCCESS
;
}
...
...
@@ -826,6 +865,9 @@ int GraphJournal::undo_properties_select()
char
name
[
80
];
int
sts
;
if
(
debug
>=
2
)
printf
(
"undo_properties_select
\n
"
);
fp
.
getline
(
line
,
sizeof
(
line
));
sscanf
(
line
,
"%d"
,
&
tag
);
while
(
tag
==
journal_cTag_Object
)
{
...
...
@@ -854,6 +896,9 @@ int GraphJournal::store_properties_select()
int
sel_count
;
char
name
[
80
];
if
(
debug
>=
2
)
printf
(
"store_properties_select
\n
"
);
grow_GetSelectList
(
graph
->
grow
->
ctx
,
&
sel_list
,
&
sel_count
);
for
(
int
i
=
0
;
i
<
sel_count
;
i
++
)
{
grow_GetObjectName
(
sel_list
[
i
],
name
);
...
...
@@ -874,6 +919,9 @@ int GraphJournal::undo_properties_object()
char
name
[
80
];
int
sts
;
if
(
debug
>=
2
)
printf
(
"undo_properties_object
\n
"
);
fp
.
getline
(
line
,
sizeof
(
line
));
sscanf
(
line
,
"%d"
,
&
tag
);
if
(
tag
!=
journal_cTag_Object
)
...
...
@@ -903,6 +951,9 @@ int GraphJournal::store_properties_object( grow_tObject o)
{
char
name
[
80
];
if
(
debug
>=
2
)
printf
(
"store_properties_object
\n
"
);
grow_GetObjectName
(
o
,
name
);
fp
<<
journal_cTag_Object
<<
endl
;
...
...
@@ -920,6 +971,9 @@ int GraphJournal::undo_group_select()
int
tag
;
int
sts
;
if
(
debug
>=
2
)
printf
(
"undo_group_select
\n
"
);
fp
.
getline
(
line
,
sizeof
(
line
));
sscanf
(
line
,
"%d"
,
&
tag
);
if
(
tag
!=
journal_cTag_Object
)
...
...
@@ -944,6 +998,9 @@ int GraphJournal::store_undo_group_select( grow_tObject o)
{
char
name
[
80
];
if
(
debug
>=
2
)
printf
(
"store_undo_group_select
\n
"
);
grow_GetObjectName
(
o
,
name
);
fp
<<
journal_cTag_Object
<<
endl
;
...
...
@@ -958,6 +1015,9 @@ int GraphJournal::store_redo_group_select()
grow_tObject
*
sel_list
;
int
sel_count
;
if
(
debug
>=
2
)
printf
(
"store_redo_group_select
\n
"
);
grow_GetSelectList
(
graph
->
grow
->
ctx
,
&
sel_list
,
&
sel_count
);
for
(
int
i
=
0
;
i
<
sel_count
;
i
++
)
{
grow_GetObjectName
(
sel_list
[
i
],
name
);
...
...
@@ -982,6 +1042,9 @@ int GraphJournal::redo_group_select()
grow_tObject
group
;
GeDyn
*
data
;
if
(
debug
>=
2
)
printf
(
"redo_group_select
\n
"
);
grow_SelectClear
(
graph
->
grow
->
ctx
);
fp
.
getline
(
line
,
sizeof
(
line
));
...
...
@@ -1107,6 +1170,9 @@ int GraphJournal::store_undo_ungroup_select()
grow_tObject
*
member_list
;
int
member_count
;
if
(
debug
>=
2
)
printf
(
"store_undo_ungroup_select
\n
"
);
grow_GetSelectList
(
graph
->
grow
->
ctx
,
&
sel_list
,
&
sel_count
);
for
(
int
i
=
0
;
i
<
sel_count
;
i
++
)
{
if
(
grow_GetObjectType
(
sel_list
[
i
])
==
glow_eObjectType_GrowGroup
)
{
...
...
@@ -1136,6 +1202,9 @@ int GraphJournal::store_redo_ungroup_select()
grow_tObject
*
sel_list
;
int
sel_count
;
if
(
debug
>=
2
)
printf
(
"store_redo_ungroup_select
\n
"
);
grow_GetSelectList
(
graph
->
grow
->
ctx
,
&
sel_list
,
&
sel_count
);
for
(
int
i
=
0
;
i
<
sel_count
;
i
++
)
{
if
(
grow_GetObjectType
(
sel_list
[
i
])
==
glow_eObjectType_GrowGroup
)
{
...
...
@@ -1158,6 +1227,9 @@ int GraphJournal::redo_ungroup_select()
int
tag
;
int
sts
;
if
(
debug
>=
2
)
printf
(
"redo_ungroup_select
\n
"
);
fp
.
getline
(
line
,
sizeof
(
line
));
sscanf
(
line
,
"%d"
,
&
tag
);
while
(
tag
==
journal_cTag_Object
)
{
...
...
@@ -1185,6 +1257,9 @@ int GraphJournal::undo_paste()
char
line
[
100
];
int
tag
;
if
(
debug
>=
2
)
printf
(
"undo_paste
\n
"
);
grow_SetNodraw
(
graph
->
grow
->
ctx
);
fp
.
getline
(
line
,
sizeof
(
line
));
sscanf
(
line
,
"%d"
,
&
tag
);
...
...
@@ -1214,6 +1289,9 @@ int GraphJournal::store_undo_paste()
grow_tObject
*
move_list
;
int
move_count
;
if
(
debug
>=
2
)
printf
(
"store_undo_paste
\n
"
);
grow_GetMoveList
(
graph
->
grow
->
ctx
,
&
move_list
,
&
move_count
);
for
(
int
i
=
0
;
i
<
move_count
;
i
++
)
{
pastelist
.
push_back
(
move_list
[
i
]);
...
...
@@ -1233,6 +1311,9 @@ int GraphJournal::redo_paste()
char
line
[
100
];
int
tag
;
if
(
debug
>=
2
)
printf
(
"redo_paste
\n
"
);
fp
.
getline
(
line
,
sizeof
(
line
));
sscanf
(
line
,
"%d"
,
&
tag
);
while
(
tag
==
journal_cTag_Object
)
{
...
...
@@ -1253,6 +1334,9 @@ int GraphJournal::redo_paste()
int
GraphJournal
::
store_redo_paste
()
{
if
(
debug
>=
2
)
printf
(
"store_redo_paste
\n
"
);
grow_SetNodraw
(
graph
->
grow
->
ctx
);
for
(
int
i
=
0
;
i
<
(
int
)
pastelist
.
size
();
i
++
)
{
fp
<<
journal_cTag_Object
<<
endl
;
...
...
@@ -1276,6 +1360,9 @@ int GraphJournal::undo_pop_select()
int
tag
;
int
sts
;
if
(
debug
>=
2
)
printf
(
"undo_pop_select
\n
"
);
grow_SetNodraw
(
graph
->
grow
->
ctx
);
fp
.
getline
(
line
,
sizeof
(
line
));
...
...
@@ -1316,6 +1403,9 @@ int GraphJournal::store_undo_pop_select()
grow_tObject
next
;
int
sts
;
if
(
debug
>=
2
)
printf
(
"store_undo_pop_select
\n
"
);
grow_GetSelectList
(
graph
->
grow
->
ctx
,
&
sel_list
,
&
sel_count
);
for
(
int
i
=
sel_count
-
1
;
i
>=
0
;
i
--
)
{
fp
<<
journal_cTag_Object
<<
endl
;
...
...
@@ -1341,6 +1431,9 @@ int GraphJournal::store_redo_pop_select()
grow_tObject
*
sel_list
;
int
sel_count
;
if
(
debug
>=
2
)
printf
(
"store_redo_pop_select
\n
"
);
grow_GetSelectList
(
graph
->
grow
->
ctx
,
&
sel_list
,
&
sel_count
);
for
(
int
i
=
0
;
i
<
sel_count
;
i
++
)
{
grow_GetObjectName
(
sel_list
[
i
],
name
);
...
...
@@ -1360,6 +1453,9 @@ int GraphJournal::redo_pop_select()
char
line
[
100
];
int
tag
;
if
(
debug
>=
2
)
printf
(
"redo_pop_select
\n
"
);
grow_SetNodraw
(
graph
->
grow
->
ctx
);
grow_SelectClear
(
graph
->
grow
->
ctx
);
...
...
@@ -1397,6 +1493,9 @@ int GraphJournal::undo_push_select()
int
tag
;
int
sts
;
if
(
debug
>=
2
)
printf
(
"undo_push_select
\n
"
);
grow_SetNodraw
(
graph
->
grow
->
ctx
);
fp
.
getline
(
line
,
sizeof
(
line
));
...
...
@@ -1437,6 +1536,9 @@ int GraphJournal::store_undo_push_select()
grow_tObject
next
;
int
sts
;
if
(
debug
>=
2
)
printf
(
"store_undo_push_select
\n
"
);
grow_GetSelectList
(
graph
->
grow
->
ctx
,
&
sel_list
,
&
sel_count
);
for
(
int
i
=
sel_count
-
1
;
i
>=
0
;
i
--
)
{
fp
<<
journal_cTag_Object
<<
endl
;
...
...
@@ -1462,6 +1564,9 @@ int GraphJournal::store_redo_push_select()
grow_tObject
*
sel_list
;
int
sel_count
;
if
(
debug
>=
2
)
printf
(
"store_redo_push_select
\n
"
);
grow_GetSelectList
(
graph
->
grow
->
ctx
,
&
sel_list
,
&
sel_count
);
for
(
int
i
=
0
;
i
<
sel_count
;
i
++
)
{
grow_GetObjectName
(
sel_list
[
i
],
name
);
...
...
@@ -1481,6 +1586,9 @@ int GraphJournal::redo_push_select()
char
line
[
100
];
int
tag
;
if
(
debug
>=
2
)
printf
(
"redo_push_select
\n
"
);
grow_SetNodraw
(
graph
->
grow
->
ctx
);
grow_SelectClear
(
graph
->
grow
->
ctx
);
...
...
@@ -1517,6 +1625,9 @@ int GraphJournal::undo_rename()
int
tag
;
int
sts
;
if
(
debug
>=
2
)
printf
(
"undo_rename
\n
"
);
fp
.
getline
(
name_new
,
sizeof
(
name_new
));
fp
.
getline
(
name_old
,
sizeof
(
name_old
));
...
...
@@ -1537,6 +1648,9 @@ int GraphJournal::store_undo_rename( grow_tObject o)
{
char
name
[
80
];
if
(
debug
>=
2
)
printf
(
"store_undo_rename
\n
"
);
grow_GetObjectName
(
o
,
name
);
fp
<<
name
<<
endl
;
...
...
@@ -1550,6 +1664,9 @@ int GraphJournal::store_redo_rename( grow_tObject o)
{
char
name
[
80
];
if
(
debug
>=
2
)
printf
(
"store_redo_rename
\n
"
);
grow_GetObjectName
(
o
,
name
);
fp
<<
name
<<
endl
;
...
...
@@ -1568,6 +1685,9 @@ int GraphJournal::redo_rename()
int
tag
;
int
sts
;
if
(
debug
>=
2
)
printf
(
"redo_rename
\n
"
);
fp
.
getline
(
name_new
,
sizeof
(
name_new
));
fp
.
getline
(
name_old
,
sizeof
(
name_old
));
...
...
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