Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
94dcb11b
Commit
94dcb11b
authored
Aug 28, 2019
by
Piotr Gawron
Browse files
BackgroundColor should be followed by ":"
parent
eac90770
Pipeline
#13317
passed with stage
in 12 minutes and 5 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
94dcb11b
...
...
@@ -15,6 +15,8 @@ minerva (14.0.0~beta.0) unstable; urgency=low
* Small improvement: user role introduced in edit user dialog (#924)
* Small improvement: tab with list of glyps is available when adding project
with glyphs (#925)
* Small improvement: BackgroundColor parameter should be assigned using ":"
character (#929)
* Bug fix: work on FF Private Window mode could cause logout or raise an
error on when opening new tab with minerva (#892)
* Bug fix: fetching list of miRnas resulted sometimes in "Internal Server
...
...
converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/LayerXmlParser.java
View file @
94dcb11b
...
...
@@ -526,7 +526,7 @@ public class LayerXmlParser {
String
lines
[]
=
notes
.
split
(
"[\n\r]+"
);
StringBuilder
result
=
new
StringBuilder
(
""
);
for
(
String
line
:
lines
)
{
if
(!
line
.
startsWith
(
"BackgroundColor="
))
{
if
(!
line
.
startsWith
(
"BackgroundColor="
)
&&
!
line
.
startsWith
(
"BackgroundColor:"
)
)
{
result
.
append
(
line
+
"\n"
);
}
}
...
...
@@ -536,8 +536,8 @@ public class LayerXmlParser {
Color
extractBackgroundColor
(
String
notes
)
{
String
lines
[]
=
notes
.
split
(
"[\n\r]+"
);
for
(
String
line
:
lines
)
{
if
(
line
.
startsWith
(
"BackgroundColor="
))
{
String
colorString
=
line
.
replace
(
"BackgroundColor="
,
""
);
if
(
line
.
startsWith
(
"BackgroundColor="
)
||
line
.
startsWith
(
"BackgroundColor:"
)
)
{
String
colorString
=
line
.
replace
(
"BackgroundColor="
,
""
).
replace
(
"BackgroundColor:"
,
""
);
return
new
ColorParser
().
parse
(
colorString
);
}
}
...
...
@@ -560,7 +560,7 @@ public class LayerXmlParser {
notes
=
""
;
}
if
(!
layer
.
getBackgroundColor
().
equals
(
Color
.
LIGHT_GRAY
))
{
notes
+=
"\nBackgroundColor
=
"
+
new
ColorParser
().
colorToHtml
(
layer
.
getBackgroundColor
());
notes
+=
"\nBackgroundColor
:
"
+
new
ColorParser
().
colorToHtml
(
layer
.
getBackgroundColor
());
}
result
.
append
(
notes
);
result
.
append
(
"\n</celldesigner:layerNotes>"
);
...
...
converter-CellDesigner/src/test/java/lcsb/mapviewer/converter/model/celldesigner/LayerXmlParserTest.java
View file @
94dcb11b
...
...
@@ -285,6 +285,12 @@ public class LayerXmlParserTest extends CellDesignerTestFunctions {
assertNotNull
(
color
);
}
@Test
public
void
testExtractBackgroundColorWithColon
()
throws
Exception
{
Color
color
=
parser
.
extractBackgroundColor
(
"dcxvxcvxcvx\nBackgroundColor:#ccffcc"
);
assertNotNull
(
color
);
}
@Test
public
void
testExtractNonExistingBackgroundColor
()
throws
Exception
{
Color
color
=
parser
.
extractBackgroundColor
(
"dcxvxcvxcvx\nBackgroundCffcc"
);
...
...
@@ -297,6 +303,12 @@ public class LayerXmlParserTest extends CellDesignerTestFunctions {
assertFalse
(
notes
.
contains
(
"BackgroundColor"
));
}
@Test
public
void
testRemoveBackgroundColorWithColon
()
throws
Exception
{
String
notes
=
parser
.
removeBackgroundColor
(
"dcxvxcvxcvx\nBackgroundColor:#ccffcc"
);
assertFalse
(
notes
.
contains
(
"BackgroundColor"
));
}
@Test
public
void
testRemoveNonExistingBackgroundColor
()
throws
Exception
{
String
notes
=
parser
.
removeBackgroundColor
(
"dcxvxcvxcvx\nBckgroundColor=#ccffcc"
);
...
...
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