Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
d2f701da
Commit
d2f701da
authored
Nov 15, 2024
by
Riegel
Browse files
Refactor fetching of top-level CityObject
parent
0b280dc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/VertexClickHandler.java
View file @
d2f701da
...
...
@@ -49,25 +49,19 @@ public class VertexClickHandler implements ClickHandler {
MenuItem
clipMi
=
new
MenuItem
(
Localization
.
getText
(
"MainWindow.copyId"
));
clipMi
.
setOnAction
(
ea
->
{
CityObject
parent
=
p
.
getParent
().
getParent
();
if
(
parent
instanceof
BoundarySurface
bs
)
{
parent
=
bs
.
getParent
();
}
CityObject
topLevelCityObject
=
p
.
getParent
().
getParent
().
getTopLevelCityObject
();
Clipboard
clipboard
=
getSystemClipboard
();
ClipboardContent
content
=
new
ClipboardContent
();
content
.
putString
(
paren
t
.
getGmlId
().
toString
());
content
.
putString
(
topLevelCityObjec
t
.
getGmlId
().
toString
());
clipboard
.
setContent
(
content
);
});
cMenu
.
getItems
().
add
(
clipMi
);
MenuItem
detailMi
=
new
MenuItem
(
Localization
.
getText
(
"MainWindow.focusCityObject"
));
detailMi
.
setOnAction
(
ea
->
{
CityObject
parent
=
p
.
getParent
().
getParent
();
if
(
parent
instanceof
BoundarySurface
bs
)
{
parent
=
bs
.
getParent
();
}
mainWindow
.
showCityObjectDetail
(
parent
);
CityObject
topLevelCityObject
=
p
.
getParent
().
getParent
().
getTopLevelCityObject
();
mainWindow
.
showCityObjectDetail
(
topLevelCityObject
);
});
cMenu
.
getItems
().
add
(
detailMi
);
...
...
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