Double-clicking on a connection will load the destination map

This commit is contained in:
Marcus Huderle
2018-03-11 14:20:52 -07:00
parent f47e3bf4ea
commit bd2c782021
4 changed files with 30 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ MainWindow::MainWindow(QWidget *parent) :
editor = new Editor(ui);
connect(editor, SIGNAL(objectsChanged()), this, SLOT(updateSelectedObjects()));
connect(editor, SIGNAL(selectedObjectsChanged()), this, SLOT(updateSelectedObjects()));
connect(editor, SIGNAL(loadMapRequested(QString, QString)), this, SLOT(onLoadMapRequested(QString, QString)));
on_toolButton_Paint_clicked();
@@ -754,6 +755,11 @@ void MainWindow::checkToolButtons() {
ui->toolButton_Dropper->setChecked(editor->map_edit_mode == "pick");
}
void MainWindow::onLoadMapRequested(QString mapName, QString fromMapName) {
setMap(mapName);
editor->setSelectedConnectionFromMap(fromMapName);
}
void MainWindow::onMapChanged(Map *map) {
updateMapList();
}