Minor cleanup

This commit is contained in:
GriffinR 2020-04-06 12:09:45 -04:00
parent c9b6f87e06
commit 129db88453
4 changed files with 8 additions and 18 deletions

View file

@ -9,8 +9,7 @@ class HealLocation {
public:
HealLocation()=default;
HealLocation(QString, QString, int, uint16_t, uint16_t);
HealLocation(QString, QString, int, uint16_t, uint16_t, QString, uint16_t);
HealLocation(QString, QString, int, uint16_t, uint16_t, QString = "", uint16_t = 0);
friend QDebug operator<<(QDebug debug, const HealLocation &hl);
public:

View file

@ -2,17 +2,6 @@
#include "config.h"
#include "map.h"
HealLocation::HealLocation(QString id, QString map, int i, uint16_t x, uint16_t y)
{
this->idName = id;
this->mapName = map;
this->index = i;
this->x = x;
this->y = y;
this->respawnMap = "";
this->respawnNPC = 0;
}
HealLocation::HealLocation(QString id, QString map, int i, uint16_t x, uint16_t y, QString respawnMap, uint16_t respawnNPC)
{
this->idName = id;

View file

@ -1137,11 +1137,13 @@ void Editor::displayMapMetatiles() {
map_item->draw(true);
scene->addItem(map_item);
int tw = 16;
int th = 16;
scene->setSceneRect(
-BORDER_DISTANCE * 16,
-BORDER_DISTANCE * 16,
map_item->pixmap().width() + (BORDER_DISTANCE * 16) * 2,
map_item->pixmap().height() + (BORDER_DISTANCE * 16) * 2
-BORDER_DISTANCE * tw,
-BORDER_DISTANCE * th,
map_item->pixmap().width() + BORDER_DISTANCE * 2 * tw,
map_item->pixmap().height() + BORDER_DISTANCE * 2 * th
);
}

View file

@ -2203,7 +2203,7 @@ void MainWindow::on_pushButton_ChangeDimensions_clicked()
QDialogButtonBox buttonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dialog);
form.addRow(&buttonBox);
connect(&buttonBox, &QDialogButtonBox::accepted, [&dialog, &widthSpinBox, &heightSpinBox, &bwidthSpinBox, &bheightSpinBox, &errorLabel](){
connect(&buttonBox, &QDialogButtonBox::accepted, [&dialog, &widthSpinBox, &heightSpinBox, &errorLabel](){
// Ensure width and height are an acceptable size.
// The maximum number of metatiles in a map is the following:
// max = (width + 15) * (height + 14)