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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
a69f3bef
Commit
a69f3bef
authored
13 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
onelab
parent
d2db0a43
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Fltk/menuWindow.cpp
+6
-2
6 additions, 2 deletions
Fltk/menuWindow.cpp
Fltk/onelabWindow.cpp
+5
-4
5 additions, 4 deletions
Fltk/onelabWindow.cpp
with
11 additions
and
6 deletions
Fltk/menuWindow.cpp
+
6
−
2
View file @
a69f3bef
...
@@ -1595,7 +1595,11 @@ static void geometry_physical_add_cb(Fl_Widget *w, void *data)
...
@@ -1595,7 +1595,11 @@ static void geometry_physical_add_cb(Fl_Widget *w, void *data)
void
mesh_save_cb
(
Fl_Widget
*
w
,
void
*
data
)
void
mesh_save_cb
(
Fl_Widget
*
w
,
void
*
data
)
{
{
bool
force
=
data
?
true
:
false
;
bool
force_overwrite
=
false
;
if
(
data
){
std
::
string
str
((
const
char
*
)
data
);
if
(
str
==
"force_overwrite"
)
force_overwrite
=
true
;
}
std
::
string
name
=
CTX
::
instance
()
->
outputFileName
;
std
::
string
name
=
CTX
::
instance
()
->
outputFileName
;
if
(
name
.
empty
()){
if
(
name
.
empty
()){
...
@@ -1604,7 +1608,7 @@ void mesh_save_cb(Fl_Widget *w, void *data)
...
@@ -1604,7 +1608,7 @@ void mesh_save_cb(Fl_Widget *w, void *data)
else
else
name
=
GetDefaultFileName
(
CTX
::
instance
()
->
mesh
.
fileFormat
);
name
=
GetDefaultFileName
(
CTX
::
instance
()
->
mesh
.
fileFormat
);
}
}
if
(
!
force
&&
CTX
::
instance
()
->
confirmOverwrite
)
{
if
(
!
force
_overwrite
&&
CTX
::
instance
()
->
confirmOverwrite
)
{
if
(
!
StatFile
(
name
))
if
(
!
StatFile
(
name
))
if
(
!
fl_choice
(
"File '%s' already exists.
\n\n
Do you want to replace it?"
,
if
(
!
fl_choice
(
"File '%s' already exists.
\n\n
Do you want to replace it?"
,
"Cancel"
,
"Replace"
,
0
,
name
.
c_str
()))
"Cancel"
,
"Replace"
,
0
,
name
.
c_str
()))
...
...
This diff is collapsed.
Click to expand it.
Fltk/onelabWindow.cpp
+
5
−
4
View file @
a69f3bef
...
@@ -240,19 +240,20 @@ void onelab_cb(Fl_Widget *w, void *data)
...
@@ -240,19 +240,20 @@ void onelab_cb(Fl_Widget *w, void *data)
FlGui
::
instance
()
->
onelab
->
deactivate
();
FlGui
::
instance
()
->
onelab
->
deactivate
();
// Gmsh client is special
(
always gets executed first
)
. The
//
the
Gmsh client is special
: it
always gets executed first.
(
The
// meta-model will allow more flexibility: but in the simple GUI we
// meta-model will allow more flexibility: but in the simple GUI we
// can assume this
// can assume this
)
if
(
onelab
::
server
::
instance
()
->
findClient
(
"Gmsh"
)
!=
if
(
onelab
::
server
::
instance
()
->
findClient
(
"Gmsh"
)
!=
onelab
::
server
::
instance
()
->
lastClient
()){
onelab
::
server
::
instance
()
->
lastClient
()){
// reload geometry if Gmsh parameters have been modified
// reload geometry
and/or mesh
if Gmsh parameters have been modified
if
(
onelab
::
server
::
instance
()
->
getChanged
(
"Gmsh"
)){
if
(
onelab
::
server
::
instance
()
->
getChanged
(
"Gmsh"
)){
if
(
action
==
"check"
){
if
(
action
==
"check"
){
geometry_reload_cb
(
0
,
0
);
geometry_reload_cb
(
0
,
0
);
}
}
else
if
(
action
==
"compute"
){
else
if
(
action
==
"compute"
){
geometry_reload_cb
(
0
,
0
);
mesh_3d_cb
(
0
,
0
);
mesh_3d_cb
(
0
,
0
);
mesh_save_cb
(
0
,
(
void
*
)
"force"
);
mesh_save_cb
(
0
,
(
void
*
)
"force
_overwrite
"
);
onelab
::
server
::
instance
()
->
setChanged
(
false
,
"Gmsh"
);
onelab
::
server
::
instance
()
->
setChanged
(
false
,
"Gmsh"
);
}
}
}
}
...
...
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