Commit 0eed4f37 authored by pwrd's avatar pwrd

Flow closing down bugfix

parent 5935f66d
...@@ -342,6 +342,8 @@ FlowCon::~FlowCon() ...@@ -342,6 +342,8 @@ FlowCon::~FlowCon()
ctx->remove(this); ctx->remove(this);
ctx->select_remove(this); ctx->select_remove(this);
if (ctx->del_all)
return;
if (temporary_ref || cc->con_type == flow_eConType_Reference) { if (temporary_ref || cc->con_type == flow_eConType_Reference) {
source_node->conpoint_refcon_reconfig(source_conpoint); source_node->conpoint_refcon_reconfig(source_conpoint);
......
...@@ -85,7 +85,7 @@ FlowCtx::FlowCtx(const char* ctx_name, double zoom_fact, int offs_x, int offs_y) ...@@ -85,7 +85,7 @@ FlowCtx::FlowCtx(const char* ctx_name, double zoom_fact, int offs_x, int offs_y)
select_policy(flow_eSelectPolicy_Partial), tiptext(0), select_policy(flow_eSelectPolicy_Partial), tiptext(0),
inverse_color(flow_eDrawType_Line), inverse_color(flow_eDrawType_Line),
text_coding(flow_eTextCoding_ISO8859_1), text_coding(flow_eTextCoding_ISO8859_1),
display_level(flow_mDisplayLevel_1), scroll_size(0), scroll_callback(0), display_level(flow_mDisplayLevel_1), del_all(0), scroll_size(0), scroll_callback(0),
scroll_data(NULL) scroll_data(NULL)
{ {
strcpy(name, ctx_name); strcpy(name, ctx_name);
...@@ -121,6 +121,7 @@ FlowCtx::~FlowCtx() ...@@ -121,6 +121,7 @@ FlowCtx::~FlowCtx()
void FlowCtx::delete_all() void FlowCtx::delete_all()
{ {
set_nodraw(); set_nodraw();
del_all = 1;
for (int i = 0; i < a.a_size; i++) { for (int i = 0; i < a.a_size; i++) {
FlowArrayElem* element = a.a[i]; FlowArrayElem* element = a.a[i];
remove(element); remove(element);
...@@ -130,6 +131,7 @@ void FlowCtx::delete_all() ...@@ -130,6 +131,7 @@ void FlowCtx::delete_all()
i--; i--;
} }
reset_nodraw(); reset_nodraw();
del_all = 0;
} }
int FlowCtx::save(char* filename, flow_eSaveMode mode) int FlowCtx::save(char* filename, flow_eSaveMode mode)
......
...@@ -422,6 +422,7 @@ public: ...@@ -422,6 +422,7 @@ public:
a.move_widgets(x, y); a.move_widgets(x, y);
} }
int display_level; int display_level;
int del_all;
void scroll(int delta_x, int delta_y); void scroll(int delta_x, int delta_y);
void scroll(double delta_x, double delta_y); void scroll(double delta_x, double delta_y);
double scroll_size; double scroll_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment