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
c5bd8ead
Commit
c5bd8ead
authored
Dec 02, 2019
by
Piotr Gawron
Browse files
Font colour of text area was preserved in Empty view
parent
c4dcf825
Pipeline
#17300
failed with stage
in 22 minutes and 8 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
c5bd8ead
...
...
@@ -10,6 +10,7 @@ minerva (14.0.5) stable; urgency=medium
present
(#
1025
)
*
Bug
fix
:
search
for
NADH
drug
resulted
in
drug
with
empty
name
(#
1018
)
*
Bug
fix
:
export
to
SBML
didn
't handle properly arrows (#1015)
* Bug fix: Font colour of text area was preserved in Empty view (#1014)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 02 Dec 2019 16:00:00 +0200
...
...
model-command/src/main/java/lcsb/mapviewer/commands/ClearColorModelCommand.java
View file @
c5bd8ead
package
lcsb.mapviewer.commands
;
import
java.awt.
*
;
import
java.awt.
Color
;
import
java.util.ArrayList
;
import
lcsb.mapviewer.model.map.model.Model
;
import
lcsb.mapviewer.model.map.species.Element
;
/**
* This {@link ModelCommand} clear info about colors in a model.
...
...
@@ -43,5 +44,8 @@ public class ClearColorModelCommand extends ModelCommand {
@Override
protected
void
executeImplementation
()
throws
CommandExecutionException
{
colorModelCommand
.
execute
();
for
(
Element
element
:
colorModelCommand
.
getModel
().
getElements
())
{
element
.
setFontColor
(
Color
.
BLACK
);
}
}
}
model-command/src/test/java/lcsb/mapviewer/commands/AllCommandsTests.java
View file @
c5bd8ead
...
...
@@ -10,6 +10,7 @@ import lcsb.mapviewer.commands.properties.AllPropertyCommandTests;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
AllLayoutTests
.
class
,
AllPropertyCommandTests
.
class
,
ClearColorModelCommandTest
.
class
,
ColorModelCommandTest
.
class
,
CopyCommandTest
.
class
,
CreateHierarchyCommandTest
.
class
,
...
...
model-command/src/test/java/lcsb/mapviewer/commands/ClearColorModelCommandTest.java
0 → 100644
View file @
c5bd8ead
package
lcsb.mapviewer.commands
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
java.awt.Color
;
import
org.junit.Test
;
import
lcsb.mapviewer.model.map.compartment.PathwayCompartment
;
import
lcsb.mapviewer.model.map.model.Model
;
import
lcsb.mapviewer.model.map.species.Element
;
import
lcsb.mapviewer.modelutils.map.ElementUtils
;
public
class
ClearColorModelCommandTest
extends
CommandTestFunctions
{
ElementUtils
eu
=
new
ElementUtils
();
@Test
public
void
test
()
throws
CommandExecutionException
{
Model
model
=
super
.
createSimpleModel
();
PathwayCompartment
compartment
=
new
PathwayCompartment
(
"id"
);
compartment
.
setColor
(
Color
.
BLUE
);
compartment
.
setFontColor
(
Color
.
YELLOW
);
model
.
addElement
(
compartment
);
new
ClearColorModelCommand
(
model
).
execute
();
for
(
Element
e
:
model
.
getElements
())
{
assertEquals
(
Color
.
WHITE
,
e
.
getColor
());
assertEquals
(
eu
.
getElementTag
(
e
)
+
"Invalid font color "
,
Color
.
BLACK
,
e
.
getFontColor
());
}
}
}
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