@@ -1021,10 +1021,6 @@ namespace OGF {
1021
1021
MeshGrobPaintRect::MeshGrobPaintRect (
1022
1022
ToolsManager* parent
1023
1023
) : MeshGrobPaintTool(parent) {
1024
- // This active flag is needed, else sometimes when one
1025
- // picks a GUI item, this triggers a release() event
1026
- // and creates a selection.
1027
- active_ = false ;
1028
1024
}
1029
1025
1030
1026
void MeshGrobPaintRect::grab (const RayPick& p_ndc) {
@@ -1036,7 +1032,6 @@ namespace OGF {
1036
1032
1037
1033
MeshGrobPaintTool::grab (p_ndc);
1038
1034
p_ = ndc_to_dc (p_ndc.p_ndc );
1039
- active_ = true ;
1040
1035
}
1041
1036
1042
1037
void MeshGrobPaintRect::drag (const RayPick& p_ndc) {
@@ -1046,10 +1041,6 @@ namespace OGF {
1046
1041
return ;
1047
1042
}
1048
1043
1049
- if (!active_) {
1050
- return ;
1051
- }
1052
-
1053
1044
// Draw selection rectangle in overlay
1054
1045
vec2 q = ndc_to_dc (p_ndc.p_ndc );
1055
1046
rendering_context ()->overlay ().clear ();
@@ -1085,11 +1076,6 @@ namespace OGF {
1085
1076
return ;
1086
1077
}
1087
1078
1088
- if (!active_) {
1089
- return ;
1090
- }
1091
-
1092
- active_ = false ;
1093
1079
vec2 q = ndc_to_dc (raypick.p_ndc );
1094
1080
index_t px = index_t (p_.x );
1095
1081
index_t py = index_t (p_.y );
@@ -1284,7 +1270,6 @@ namespace OGF {
1284
1270
1285
1271
MeshGrobPaintTool::grab (raypick);
1286
1272
selection_.push_back (ndc_to_dc (raypick.p_ndc ));
1287
- active_ = true ;
1288
1273
}
1289
1274
1290
1275
void MeshGrobPaintFreeform::drag (const RayPick& raypick) {
@@ -1294,9 +1279,6 @@ namespace OGF {
1294
1279
return ;
1295
1280
}
1296
1281
1297
- if (!active_) {
1298
- return ;
1299
- }
1300
1282
if (length (raypick.p_ndc - latest_ndc_) <= 10.0 /1024.0 ) {
1301
1283
return ;
1302
1284
}
@@ -1318,11 +1300,6 @@ namespace OGF {
1318
1300
return ;
1319
1301
}
1320
1302
1321
- if (!active_) {
1322
- return ;
1323
- }
1324
- active_ = false ;
1325
-
1326
1303
index_t x0,y0 ,width,height;
1327
1304
{
1328
1305
double minx = Numeric::max_float64 ();
0 commit comments