Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
5df8e270
Commit
5df8e270
authored
16 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
sync changed flag of model-based view with vsibility browser
parent
af1d52cb
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Graphics/Mesh.cpp
+12
-2
12 additions, 2 deletions
Graphics/Mesh.cpp
Post/PViewData.h
+2
-0
2 additions, 0 deletions
Post/PViewData.h
Post/PViewDataGModel.cpp
+11
-1
11 additions, 1 deletion
Post/PViewDataGModel.cpp
Post/PViewDataGModel.h
+1
-0
1 addition, 0 deletions
Post/PViewDataGModel.h
with
26 additions
and
3 deletions
Graphics/Mesh.cpp
+
12
−
2
View file @
5df8e270
// $Id: Mesh.cpp,v 1.2
19
2008-0
3-20 11:44
:0
7
geuzaine Exp $
// $Id: Mesh.cpp,v 1.2
20
2008-0
4-17 05:58
:0
9
geuzaine Exp $
//
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -819,8 +819,19 @@ class drawMeshGRegion {
...
@@ -819,8 +819,19 @@ class drawMeshGRegion {
// Main drawing routine
// Main drawing routine
#include
"PView.h"
void
Draw_Mesh
()
void
Draw_Mesh
()
{
{
GModel
*
m
=
GModel
::
current
();
// make sure to flag any model-dependent post-processing view as
// changed if the underlying mesh has, before resetting the changed
// flag
for
(
unsigned
int
i
=
0
;
i
<
PView
::
list
.
size
();
i
++
)
if
(
PView
::
list
[
i
]
->
getData
()
->
hasModel
(
m
)
&&
CTX
.
mesh
.
changed
)
PView
::
list
[
i
]
->
setChanged
(
true
);
if
(
!
CTX
.
mesh
.
draw
)
return
;
if
(
!
CTX
.
mesh
.
draw
)
return
;
glPointSize
(
CTX
.
mesh
.
point_size
);
glPointSize
(
CTX
.
mesh
.
point_size
);
...
@@ -843,7 +854,6 @@ void Draw_Mesh()
...
@@ -843,7 +854,6 @@ void Draw_Mesh()
static
bool
busy
=
false
;
static
bool
busy
=
false
;
if
(
!
busy
){
if
(
!
busy
){
busy
=
true
;
busy
=
true
;
GModel
*
m
=
GModel
::
current
();
int
status
=
m
->
getMeshStatus
();
int
status
=
m
->
getMeshStatus
();
if
(
CTX
.
mesh
.
changed
)
{
if
(
CTX
.
mesh
.
changed
)
{
Msg
(
DEBUG
,
"Mesh has changed: reinitializing drawing data"
,
CTX
.
mesh
.
changed
);
Msg
(
DEBUG
,
"Mesh has changed: reinitializing drawing data"
,
CTX
.
mesh
.
changed
);
...
...
This diff is collapsed.
Click to expand it.
Post/PViewData.h
+
2
−
0
View file @
5df8e270
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#define VAL_INF 1.e200
#define VAL_INF 1.e200
class
GModel
;
class
nameData
;
class
nameData
;
// abstract interface to post-processing view data
// abstract interface to post-processing view data
...
@@ -119,6 +120,7 @@ class PViewData {
...
@@ -119,6 +120,7 @@ class PViewData {
virtual
bool
hasTimeStep
(
int
step
){
return
step
<
getNumTimeSteps
();
}
virtual
bool
hasTimeStep
(
int
step
){
return
step
<
getNumTimeSteps
();
}
virtual
bool
hasPartition
(
int
part
){
return
false
;
}
virtual
bool
hasPartition
(
int
part
){
return
false
;
}
virtual
bool
hasMultipleMeshes
(){
return
false
;
}
virtual
bool
hasMultipleMeshes
(){
return
false
;
}
virtual
bool
hasModel
(
GModel
*
model
,
int
step
=-
1
){
return
false
;
}
virtual
bool
useGaussPoints
(){
return
false
;
}
virtual
bool
useGaussPoints
(){
return
false
;
}
// I/O routines
// I/O routines
...
...
This diff is collapsed.
Click to expand it.
Post/PViewDataGModel.cpp
+
11
−
1
View file @
5df8e270
// $Id: PViewDataGModel.cpp,v 1.5
0
2008-04-1
6 22:10:53
geuzaine Exp $
// $Id: PViewDataGModel.cpp,v 1.5
1
2008-04-1
7 05:58:09
geuzaine Exp $
//
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -420,6 +420,16 @@ bool PViewDataGModel::hasMultipleMeshes()
...
@@ -420,6 +420,16 @@ bool PViewDataGModel::hasMultipleMeshes()
return
false
;
return
false
;
}
}
bool
PViewDataGModel
::
hasModel
(
GModel
*
model
,
int
step
)
{
if
(
step
<
0
){
for
(
unsigned
int
i
=
0
;
i
<
_steps
.
size
();
i
++
)
if
(
model
==
_steps
[
i
]
->
getModel
())
return
true
;
return
false
;
}
return
(
model
==
_steps
[
step
]
->
getModel
());
}
GEntity
*
PViewDataGModel
::
getEntity
(
int
step
,
int
ent
)
GEntity
*
PViewDataGModel
::
getEntity
(
int
step
,
int
ent
)
{
{
return
_steps
[
step
]
->
getEntity
(
ent
);
return
_steps
[
step
]
->
getEntity
(
ent
);
...
...
This diff is collapsed.
Click to expand it.
Post/PViewDataGModel.h
+
1
−
0
View file @
5df8e270
...
@@ -180,6 +180,7 @@ class PViewDataGModel : public PViewData {
...
@@ -180,6 +180,7 @@ class PViewDataGModel : public PViewData {
bool
hasTimeStep
(
int
step
);
bool
hasTimeStep
(
int
step
);
bool
hasPartition
(
int
part
);
bool
hasPartition
(
int
part
);
bool
hasMultipleMeshes
();
bool
hasMultipleMeshes
();
bool
hasModel
(
GModel
*
model
,
int
step
=-
1
);
bool
useGaussPoints
(){
return
_type
==
GaussPointData
;
}
bool
useGaussPoints
(){
return
_type
==
GaussPointData
;
}
// get the data type
// get the data type
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment