Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Erik von Reis
dtt
Commits
c17fa277
Commit
c17fa277
authored
Mar 11, 2021
by
Erik von Reis
Browse files
work around ROOT error that crashes foton
parent
33e2505e
Pipeline
#230315
failed with stages
in 3 minutes and 2 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/gui/filterwiz/TLGFilterWizard.cc
View file @
c17fa277
...
...
@@ -859,6 +859,7 @@ TLGFilterWizWindow::FileErrorIndication(Bool_t error)
//-------- Command text-box
fCommand
=
new
TLGTextEdit
(
fG
[
3
],
10
,
10
,
kCommandId
);
fCommand
->
Clear
();
fCommand
->
Associate
(
this
);
fG
[
3
]
->
AddFrame
(
fCommand
,
0
);
...
...
@@ -1046,6 +1047,7 @@ TLGFilterWizWindow::FileErrorIndication(Bool_t error)
{
if
(
strcmp
(
name
,
"."
)
&&
strcmp
(
name
,
".."
))
{
printf
(
"Checking file %s... "
,
name
);
// found a file: open it and check magic token
string
fullname
=
string
(
dir
)
+
"/"
+
name
;
ifstream
inp
(
fullname
.
c_str
());
...
...
@@ -1053,8 +1055,10 @@ TLGFilterWizWindow::FileErrorIndication(Bool_t error)
inp
.
read
(
line
,
lMagic
);
if
(
inp
&&
(
strncmp
(
line
,
kMagic
,
lMagic
)
==
0
))
{
printf
(
"Added
\n
"
);
nlist
.
push_back
(
name
);
}
printf
(
"Ignored
\n
"
);
}
}
gSystem
->
FreeDirectory
(
dirp
);
...
...
@@ -1916,6 +1920,7 @@ TLGFilterWizWindow::FileErrorIndication(Bool_t error)
}
if
((
fCurSections
.
size
()
!=
1
)
&&
(
fCurDesignActive
||
force
))
{
fCommand
->
Clear
();
// Set the state of the GUI widgets for multiple selected sections.
fCommand
->
LoadBuffer
(
" "
);
fCommand
->
SetState
(
kFALSE
);
...
...
src/gui/ligogui/TLGTextEditor.cc
View file @
c17fa277
...
...
@@ -81,8 +81,32 @@ namespace ligogui {
// newline characters), removes the funky tab padding characters
// and reformats it into a STL string.
//
TString
txt
=
GetText
()
->
AsString
();
int
N
=
txt
.
Length
();
// work-around GetText()->AsString(), which is buggy.
auto
text_block
=
GetText
();
// AsString() is broken. The only public access is
// TGText::GetChar()
TGLongPosition
pos
(
0
,
0
);
char
c
;
std
::
string
txt
=
""
;
while
((
c
=
text_block
->
GetChar
(
pos
))
>=
0
)
{
do
{
if
(
c
!=
cmt
)
{
txt
+=
c
;
}
pos
.
fX
+=
1
;
}
while
((
c
=
text_block
->
GetChar
(
pos
))
>=
0
&&
c
!=
cmt
);
pos
.
fX
=
0
;
pos
.
fY
+=
1
;
txt
+=
'\n'
;
}
int
N
=
txt
.
length
();
std
::
string
cmd
;
cmd
.
reserve
(
N
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment