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
01518760
Commit
01518760
authored
11 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
automatic calls to OpenProject in onelab should not change the window title
parent
5453afb2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Common/OpenFile.cpp
+9
-7
9 additions, 7 deletions
Common/OpenFile.cpp
Common/OpenFile.h
+3
-2
3 additions, 2 deletions
Common/OpenFile.h
Common/onelabUtils.cpp
+2
-2
2 additions, 2 deletions
Common/onelabUtils.cpp
with
14 additions
and
11 deletions
Common/OpenFile.cpp
+
9
−
7
View file @
01518760
...
...
@@ -262,7 +262,7 @@ static int defineSolver(const std::string &name)
return
NUM_SOLVERS
-
1
;
}
int
MergeFile
(
const
std
::
string
&
fileName
,
bool
warnIfMissing
)
int
MergeFile
(
const
std
::
string
&
fileName
,
bool
warnIfMissing
,
bool
setWindowTitle
)
{
if
(
GModel
::
current
()
->
getName
()
==
""
){
GModel
::
current
()
->
setFileName
(
fileName
);
...
...
@@ -270,7 +270,7 @@ int MergeFile(const std::string &fileName, bool warnIfMissing)
}
#if defined(HAVE_FLTK)
if
(
FlGui
::
available
())
if
(
FlGui
::
available
()
&&
setWindowTitle
)
FlGui
::
instance
()
->
setGraphicTitle
(
GModel
::
current
()
->
getFileName
());
#endif
...
...
@@ -303,7 +303,7 @@ int MergeFile(const std::string &fileName, bool warnIfMissing)
Msg
::
Error
(
"Failed to uncompress `%s': check directory permissions"
,
fileName
.
c_str
());
GModel
::
current
()
->
setFileName
(
noExt
);
return
MergeFile
(
noExt
);
return
MergeFile
(
noExt
,
true
,
setWindowTitle
);
}
}
...
...
@@ -497,8 +497,10 @@ int MergeFile(const std::string &fileName, bool warnIfMissing)
if
(
!
status
)
Msg
::
Error
(
"Error loading '%s'"
,
fileName
.
c_str
());
Msg
::
StatusBar
(
true
,
"Done reading '%s'"
,
fileName
.
c_str
());
CTX
::
instance
()
->
fileread
=
true
;
// merge the associated option file if there is one
CTX
::
instance
()
->
fileread
=
true
;
// merge the associated option file if there is one
if
(
!
StatFile
(
fileName
+
".opt"
))
MergeFile
(
fileName
+
".opt"
);
...
...
@@ -620,7 +622,7 @@ void ClearProject()
Msg
::
ResetErrorCounter
();
}
void
OpenProject
(
const
std
::
string
&
fileName
)
void
OpenProject
(
const
std
::
string
&
fileName
,
bool
setWindowTitle
)
{
if
(
CTX
::
instance
()
->
lock
)
{
Msg
::
Info
(
"I'm busy! Ask me that later..."
);
...
...
@@ -657,7 +659,7 @@ void OpenProject(const std::string &fileName)
ResetTemporaryBoundingBox
();
// merge the file
if
(
MergeFile
(
fileName
))
{
if
(
MergeFile
(
fileName
,
true
,
setWindowTitle
))
{
if
(
fileName
!=
CTX
::
instance
()
->
recentFiles
.
front
())
CTX
::
instance
()
->
recentFiles
.
insert
(
CTX
::
instance
()
->
recentFiles
.
begin
(),
fileName
);
...
...
This diff is collapsed.
Click to expand it.
Common/OpenFile.h
+
3
−
2
View file @
01518760
...
...
@@ -10,9 +10,10 @@
int
ParseFile
(
const
std
::
string
&
fileName
,
bool
close
,
bool
warnIfMissing
=
false
);
void
ParseString
(
const
std
::
string
&
str
);
void
OpenProject
(
const
std
::
string
&
filename
);
void
OpenProject
(
const
std
::
string
&
filename
,
bool
setWindowTitle
=
true
);
void
OpenProjectMacFinder
(
const
char
*
fileName
);
int
MergeFile
(
const
std
::
string
&
fileName
,
bool
warnIfMissing
=
false
);
int
MergeFile
(
const
std
::
string
&
fileName
,
bool
warnIfMissing
=
false
,
bool
setWindowTitle
=
true
);
int
MergePostProcessingFile
(
const
std
::
string
&
fileName
,
bool
showLastStep
=
false
,
bool
hideNewViews
=
false
,
bool
warnIfMissing
=
false
);
void
ClearProject
();
...
...
This diff is collapsed.
Click to expand it.
Common/onelabUtils.cpp
+
2
−
2
View file @
01518760
...
...
@@ -317,7 +317,7 @@ namespace onelabUtils {
// name has changed
modelName
=
GModel
::
current
()
->
getName
();
redraw
=
true
;
OpenProject
(
GModel
::
current
()
->
getFileName
());
OpenProject
(
GModel
::
current
()
->
getFileName
()
,
false
);
}
}
else
if
(
action
==
"compute"
){
...
...
@@ -327,7 +327,7 @@ namespace onelabUtils {
// have been modified or if the model name has changed
modelName
=
GModel
::
current
()
->
getName
();
redraw
=
true
;
OpenProject
(
GModel
::
current
()
->
getFileName
());
OpenProject
(
GModel
::
current
()
->
getFileName
()
,
false
);
if
(
getFirstComputationFlag
()
&&
!
StatFile
(
mshFileName
)){
Msg
::
Info
(
"Skipping mesh generation: assuming '%s' is up-to-date"
,
mshFileName
.
c_str
());
...
...
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