Fixup connection graphicswindow dimensions
This commit is contained in:
parent
2b5da0ee01
commit
8df2a864a0
2 changed files with 2 additions and 2 deletions
|
@ -152,7 +152,6 @@ void Editor::showCurrentConnectionMap(QString curDirection) {
|
|||
connection_item->setY(y);
|
||||
connection_item->setZValue(21);
|
||||
scene->addItem(connection_item);
|
||||
scene->setSceneRect(0, 0, pixmap.width() + map_item->pixmap().width(), pixmap.height() + map_item->pixmap().height());
|
||||
|
||||
connect(connection_item, SIGNAL(connectionMoved(int)), this, SLOT(onConnectionOffsetChanged(int)));
|
||||
onConnectionOffsetChanged(connection->offset.toInt());
|
||||
|
@ -163,7 +162,6 @@ void Editor::showCurrentConnectionMap(QString curDirection) {
|
|||
|
||||
if (!connectionExists) {
|
||||
if (connection_item) {
|
||||
scene->removeItem(connection_item);
|
||||
delete connection_item;
|
||||
connection_item = NULL;
|
||||
|
||||
|
|
|
@ -154,6 +154,8 @@ void MainWindow::setMap(QString map_name) {
|
|||
ui->graphicsView_Objects_Map->editor = editor;
|
||||
|
||||
ui->graphicsView_Connections->setScene(editor->scene);
|
||||
ui->graphicsView_Connections->setSceneRect(editor->scene->sceneRect());
|
||||
ui->graphicsView_Connections->setFixedSize(editor->scene->width() + 2, editor->scene->height() + 2);
|
||||
|
||||
ui->graphicsView_Metatiles->setScene(editor->scene_metatiles);
|
||||
//ui->graphicsView_Metatiles->setSceneRect(editor->scene_metatiles->sceneRect());
|
||||
|
|
Loading…
Reference in a new issue