[qet] qet/qet: [4929] fix on lock while creating elmt |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4929
Author: rdsivd
Date: 2017-03-12 21:31:34 +0100 (Sun, 12 Mar 2017)
Log Message:
-----------
fix on lock while creating elmt
Modified Paths:
--------------
branches/DXFtoQET3_DB/data.h
branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp
branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h
branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp
branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h
branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp
Modified: branches/DXFtoQET3_DB/data.h
===================================================================
--- branches/DXFtoQET3_DB/data.h 2017-03-10 22:53:29 UTC (rev 4928)
+++ branches/DXFtoQET3_DB/data.h 2017-03-12 20:31:34 UTC (rev 4929)
@@ -8,8 +8,8 @@
#define DXF_base_set 1
#define DXF_item_split 100000 //dxf split tables
-#define DXF_codes_set 20000
-#define DXF_codeset_copies 20000
+#define DXF_codes_set 50000
+#define DXF_codeset_copies 50000
#define QET_L_POLYLINE 100
#define DXF_layers_set 500
Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp 2017-03-10 22:53:29 UTC (rev 4928)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp 2017-03-12 20:31:34 UTC (rev 4929)
@@ -93,6 +93,8 @@
DXF_Block_Name=Record2.value("dxf_2").toString();
+ read_error2=1;
+
if (Record2.value("Command").toString()=="BLOCK" and Record2.value("dxf_2").toString()==Block_name)
{
end_block=0;
@@ -99,7 +101,11 @@
while (end_block==0)
{
- NewQuery.next();
+ read_error2 = NewQuery.next();
+ if (read_error2==false)
+ {
+ end_block++;
+ }
QSqlRecord Record3=NewQuery.record();
if (Record3.value("Command").toString()=="LINE" and Record3.value("Command_count").toInt()==0)
Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h 2017-03-10 22:53:29 UTC (rev 4928)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h 2017-03-12 20:31:34 UTC (rev 4929)
@@ -29,6 +29,8 @@
public:
explicit elmt_block_level2(QWidget *parent = 0);
+ int read_error2;
+
int end_block;
int end_seqend;
int end_lwpoly;
Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp 2017-03-10 22:53:29 UTC (rev 4928)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp 2017-03-12 20:31:34 UTC (rev 4929)
@@ -23,13 +23,13 @@
DXF_main_base[0].QDXF_block_circle_color="blue";
DXF_main_base[0].QDXF_block_ellipse_color="blue";
DXF_main_base[0].QDXF_block_input_color="blue";
- DXF_main_base[0].QDXF_block_line_color="yellow";
- DXF_main_base[0].QDXF_block_lwpolyline_color="brun";
- DXF_main_base[0].QDXF_block_polyline_color="cyan";
+ DXF_main_base[0].QDXF_block_line_color="blue";
+ DXF_main_base[0].QDXF_block_lwpolyline_color="blue";
+ DXF_main_base[0].QDXF_block_polyline_color="blue";
DXF_main_base[0].QDXF_block_rectangel_color="blue";
DXF_main_base[0].QDXF_block_terminal_color="blue";
DXF_main_base[0].QDXF_block_text_color="blue";
- DXF_main_base[0].QDXF_block_solid_color="magenta";
+ DXF_main_base[0].QDXF_block_solid_color="blue";
xcount=0;
Logtext="";
@@ -63,6 +63,8 @@
end_block=0;
+ Block_recod_count=0;
+
//while (NewQuery.next() and end_block==0)
//while (NewQuery.next())
@@ -74,7 +76,9 @@
QSqlRecord Record2=NewQuery.record();
Recordvalue=Record2.value("Command").toString();
+ Block_recod_count++;
+
Signal_waarde1.clear();
Signal_waarde1.append(QET_handle);
Signal_waarde1.append(" : ");
@@ -102,12 +106,19 @@
if (Record2.value("Command").toString()=="BLOCK" and Record2.value("dxf_2").toString()==Block_name)
{
end_block=0;
+ read_error1=1;
while (end_block==0)
{
- NewQuery.next();
+ read_error1= NewQuery.next();
+ if (read_error1==false)
+ {
+ end_block++;
+ }
QSqlRecord Record3=NewQuery.record();
+ Block_recod_count++;
+
Signal_waarde1.clear();
Signal_waarde1.append(QET_handle);
Signal_waarde1.append(" : ");
@@ -508,6 +519,8 @@
New_DXF_blocks2.FromBlock=Record3.value("dxf_2").toString();
+ New_DXF_blocks2.Insert_Block();
+
//Logtext.append(New_DXF_blocks2.Insert_Block());
//DXF_Entities_List.DXF_Result.append(New_DXF_blocks2.Insert_Block());
Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h 2017-03-10 22:53:29 UTC (rev 4928)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h 2017-03-12 20:31:34 UTC (rev 4929)
@@ -33,6 +33,8 @@
int end_seqend;
int end_lwpoly;
+ int read_error1;
+
int32_t count_vertex;
int32_t xcount;
int32_t rowcount;
@@ -39,7 +41,9 @@
int32_t max_vertex;
int32_t Block_count;
+ int32_t Block_recod_count;
+
QString Logtext;
QString Recordvalue;
Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp 2017-03-10 22:53:29 UTC (rev 4928)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp 2017-03-12 20:31:34 UTC (rev 4929)
@@ -12,7 +12,7 @@
elmt_entities::elmt_entities(QWidget *parent) : QWidget(parent)
{
- //connect (this ,SIGNAL (Signal1(const QString &)),DXF_main_base,SLOT(update_proces(const QString &)));
+
}
void elmt_entities::Open_SQL_DB (QString ELMT_filename)
@@ -41,12 +41,12 @@
DXF_main_base[0].QDXF_entitie_ellipse_color="black";
DXF_main_base[0].QDXF_entitie_input_color="black";
DXF_main_base[0].QDXF_entitie_line_color="black";
- DXF_main_base[0].QDXF_entitie_lwpolyline_color="red";
- DXF_main_base[0].QDXF_entitie_polyline_color="blue";
+ DXF_main_base[0].QDXF_entitie_lwpolyline_color="black";
+ DXF_main_base[0].QDXF_entitie_polyline_color="black";
DXF_main_base[0].QDXF_entitie_rectangel_color="black";
DXF_main_base[0].QDXF_entitie_terminal_color="black";
DXF_main_base[0].QDXF_entitie_text_color="black";
- DXF_main_base[0].QDXF_entitie_solid_color="green";
+ DXF_main_base[0].QDXF_entitie_solid_color="black";
xcount=0;
Logtext="";
@@ -87,7 +87,7 @@
New_DXF_Input.QET_rotation=90;
New_DXF_Input.QET_text="converted";
- New_DXF_Input.QET_size=1;
+ New_DXF_Input.QET_size=2;
New_DXF_Input.QET_text_style="default" ;
@@ -506,12 +506,17 @@
New_DXF_blocks.FromBlock="Inserted from entitie ";
- Logtext.append("Inserted from entitie block : ");
- Logtext.append(Record2.value("dxf_2").toString());
- Logtext.append(" will be converted as a drawing part");
- Logtext.append(" \n");
+ Signal_waarde1.clear();
+ Signal_waarde1.append("Inserted from entitie \n");
+ Signal_waarde1.append("Inserted from entitie block : ");
+ Signal_waarde1.append(Record2.value("dxf_2").toString());
+ Signal_waarde1.append(" will be converted as a drawing part \n");
- Logtext.append(New_DXF_blocks.Insert_Block());
+ emit Signal1(Signal_waarde1);
+
+ New_DXF_blocks.Insert_Block();
+
+ //Logtext.append(New_DXF_blocks.Insert_Block());
}
if (Record2.value("Command").toString()=="LWPOLYLINE" and Record2.value("Command_count").toInt()==0)