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
d0982a96
Commit
d0982a96
authored
Oct 09, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also connections can be deleted from keyboard
parent
bd593437
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
7 deletions
+45
-7
wb/lib/wb/src/wb_foe.cpp
wb/lib/wb/src/wb_foe.cpp
+12
-5
wb/lib/wb/src/wb_gre.cpp
wb/lib/wb/src/wb_gre.cpp
+31
-1
wb/lib/wb/src/wb_gre.h
wb/lib/wb/src/wb_gre.h
+2
-1
No files found.
wb/lib/wb/src/wb_foe.cpp
View file @
d0982a96
/*
* Proview $Id: wb_foe.cpp,v 1.1
1 2008-10-03 14:18:37
claes Exp $
* Proview $Id: wb_foe.cpp,v 1.1
2 2008-10-09 08:32:51
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -565,20 +565,27 @@ void WFoe::activate_delete_confirm()
{
unsigned
long
node_count
;
vldh_t_node
*
nodelist
;
unsigned
long
con_count
=
0
;
vldh_t_con
*
conlist
;
char
msg
[
200
];
gre
->
get_selnodes
(
&
node_count
,
&
nodelist
);
if
(
!
node_count
)
{
message
(
"Nothing to delete"
);
return
;
gre
->
get_selcons
(
&
con_count
,
&
conlist
);
if
(
!
con_count
)
{
message
(
"Nothing to delete"
);
return
;
}
if
(
con_count
>
0
)
free
((
char
*
)
conlist
);
}
if
(
node_count
>
0
)
free
((
char
*
)
nodelist
);
if
(
node_count
>
1
)
if
(
node_count
+
con_count
>
1
)
strcpy
(
msg
,
"Do you want to delete the selected objects"
);
else
strcpy
(
msg
,
"Do you want to delete the selected object"
);
wow
->
DisplayQuestion
(
this
,
"Delete"
,
msg
,
delete_ok_cb
,
0
,
*
nodelist
);
wow
->
DisplayQuestion
(
this
,
"Delete"
,
msg
,
delete_ok_cb
,
0
,
0
);
}
//
...
...
wb/lib/wb/src/wb_gre.cpp
View file @
d0982a96
/*
* Proview $Id: wb_gre.cpp,v 1.1
1 2008-10-03 14:18:37
claes Exp $
* Proview $Id: wb_gre.cpp,v 1.1
2 2008-10-09 08:33:14
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1223,6 +1223,36 @@ int WGre::get_selnodes( unsigned long *node_count, vldh_t_node **nodelist)
return
GRE__SUCCESS
;
}
//
// Returns an array of all selected connections.
// The array should be freed by the user with a free call.
//
int
WGre
::
get_selcons
(
unsigned
long
*
con_count
,
vldh_t_con
**
conlist
)
{
int
i
;
vldh_t_con
con
;
flow_tCon
*
fcon_list
;
int
fcon_count
;
flow_GetSelectedCons
(
flow_ctx
,
&
fcon_list
,
&
fcon_count
);
*
con_count
=
0
;
if
(
fcon_count
==
0
)
return
GRE__SUCCESS
;
/* create array */
*
conlist
=
(
vldh_t_con
*
)
calloc
(
fcon_count
,
sizeof
(
con
));
/* Insert the cons */
for
(
i
=
0
;
i
<
fcon_count
;
i
++
)
{
flow_GetUserData
(
fcon_list
[
i
],
(
void
**
)
&
con
);
*
(
*
conlist
+
*
con_count
)
=
con
;
(
*
con_count
)
++
;
}
return
GRE__SUCCESS
;
}
//
// Returns a neted nodetypeid for the specified objecttype.
// If the the mask for the nodetype is of the defaultmask for
...
...
wb/lib/wb/src/wb_gre.h
View file @
d0982a96
/*
* Proview $Id: wb_gre.h,v 1.1
0 2008-10-03 14:18:37
claes Exp $
* Proview $Id: wb_gre.h,v 1.1
1 2008-10-09 08:33:14
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -168,6 +168,7 @@ class WGre {
int
copy
();
int
window_draw
();
int
get_selnodes
(
unsigned
long
*
node_count
,
vldh_t_node
**
nodelist
);
int
get_selcons
(
unsigned
long
*
con_count
,
vldh_t_con
**
conlist
);
int
get_nodeclass
(
pwr_tClassId
cid
,
ldh_tSesContext
ldhses
,
unsigned
long
node_type
,
unsigned
int
*
mask
,
unsigned
long
subwindowmark
,
unsigned
long
node_width
,
flow_tNodeClass
*
node_class
,
...
...
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