Skip to content
Snippets Groups Projects
Commit 651d28a3 authored by tobias's avatar tobias
Browse files

Small Fixes

- Update GlobalSettings
- Add PageMenuHandler Listener for Menu
- DnD Bug, that removes wrong pads
parent f6dfb113
Branches
Tags
No related merge requests found
......@@ -51,7 +51,7 @@
<KeyCodeCombination alt="UP" code="J" control="UP" meta="UP" shift="UP" shortcut="DOWN" />
</accelerator>
</MenuItem>
<MenuItem fx:id="pageMenu" mnemonicParsing="false" text="%main.menuitem.page">
<MenuItem fx:id="pageMenu" mnemonicParsing="false" onAction="#pageMenuHandler" text="%main.menuitem.page">
<accelerator>
<KeyCodeCombination alt="UP" code="K" control="UP" meta="UP" shift="UP" shortcut="DOWN" />
</accelerator>
......
......@@ -84,7 +84,7 @@ public class PlayPadMain extends Application implements LocalizationDelegate {
public void init() throws Exception {
App app = ApplicationUtils.getApplication();
Path globalSettingsPath = app.getPath(PathType.CONFIGURATION, "GlobalSettings.yml");
Path globalSettingsPath = app.getPath(PathType.CONFIGURATION, "GlobalSettings.xml");
GlobalSettings globalSettings = GlobalSettings.load(globalSettingsPath);
impl = new PlayPadImpl(globalSettings);
......
......@@ -562,6 +562,11 @@ public class DesktopMenuToolbarViewController extends BasicMenuToolbarViewContro
connect.setEditMode(DesktopEditMode.DRAG);
}
@FXML
void pageMenuHandler(ActionEvent event) {
connect.setEditMode(DesktopEditMode.PAGE);
}
@FXML
void colorMenuHandler(ActionEvent event) {
connect.setEditMode(DesktopEditMode.COLOR);
......
......@@ -110,12 +110,14 @@ public class Project {
public void setPad(PadIndex index, Pad pad) {
if (pad != null) {
if (pad.getPage() != index.getPage()) {
Page oldPage = getPage(pad.getPage());
// Nur Löschen, wenn auch noch das Pad an dieser Stelle ist, und nicht an andere Stelle
if (oldPage.getPad(pad.getIndex()).equals(pad)) {
oldPage.removePade(index.getId());
}
}
}
Page page = pages.get(index.getPage());
page.setPad(index.getId(), pad);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment