mirror of
https://github.com/huderlem/porymap.git
synced 2026-04-25 07:18:02 -05:00
Fix some error formatting
Some checks are pending
Build Porymap / build-linux (5.14.2) (push) Waiting to run
Build Porymap / build-linux (6.8.*) (push) Waiting to run
Build Porymap / build-macos (macos-15-intel) (push) Waiting to run
Build Porymap / build-macos (macos-latest) (push) Waiting to run
Build Porymap / build-static-windows (push) Waiting to run
Some checks are pending
Build Porymap / build-linux (5.14.2) (push) Waiting to run
Build Porymap / build-linux (6.8.*) (push) Waiting to run
Build Porymap / build-macos (macos-15-intel) (push) Waiting to run
Build Porymap / build-macos (macos-latest) (push) Waiting to run
Build Porymap / build-static-windows (push) Waiting to run
This commit is contained in:
parent
53bea222cc
commit
7719eaf546
|
|
@ -31,6 +31,7 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp
|
|||
- Fix excessive logging if Porymap fails to monitor all map files.
|
||||
- Fix map connections getting cut off in exported map images if they're on the same side as another short map connection.
|
||||
- Fix the project version check failing for some versions of `git`.
|
||||
- Fix some error highlights persisting after the error is resolved.
|
||||
|
||||
## [6.2.0] - 2025-08-08
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="form">
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
|
|
|
|||
|
|
@ -110,8 +110,9 @@ QString Util::replaceExtension(const QString &path, const QString &newExtension)
|
|||
}
|
||||
|
||||
void Util::setErrorStylesheet(QLineEdit *lineEdit, bool isError) {
|
||||
static const QString stylesheet = QStringLiteral("QLineEdit { background-color: rgba(255, 0, 0, 25%) }");
|
||||
lineEdit->setStyleSheet(isError ? stylesheet : "");
|
||||
static const QString errorStylesheet = QStringLiteral("QLineEdit { background-color: rgba(255, 0, 0, 25%) }");
|
||||
static const QString defaultStylesheet = QStringLiteral("QLineEdit {}");
|
||||
lineEdit->setStyleSheet(isError ? errorStylesheet : defaultStylesheet);
|
||||
}
|
||||
|
||||
void Util::show(QWidget *w) {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "project.h"
|
||||
#include "imageexport.h"
|
||||
#include "validator.h"
|
||||
#include "log.h"
|
||||
|
||||
NewTilesetDialog::NewTilesetDialog(Project* project, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
|
|
@ -20,8 +21,6 @@ NewTilesetDialog::NewTilesetDialog(Project* project, QWidget *parent) :
|
|||
|
||||
connect(ui->lineEdit_Name, &QLineEdit::textChanged, this, &NewTilesetDialog::onNameChanged);
|
||||
connect(ui->buttonBox, &QDialogButtonBox::clicked, this, &NewTilesetDialog::dialogButtonClicked);
|
||||
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
NewTilesetDialog::~NewTilesetDialog()
|
||||
|
|
@ -67,7 +66,7 @@ void NewTilesetDialog::accept() {
|
|||
bool secondary = ui->comboBox_Type->currentIndex() == 1;
|
||||
Tileset *tileset = this->project->createNewTileset(ui->lineEdit_Name->text(), secondary, ui->checkBox_CheckerboardFill->isChecked());
|
||||
if (!tileset) {
|
||||
ui->label_GenericError->setText(QString("Failed to create tileset. See %1 for details.").arg(getLogPath()));
|
||||
ui->label_GenericError->setText(getMostRecentError());
|
||||
ui->label_GenericError->setVisible(true);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -259,12 +259,13 @@ void ProjectSettingsEditor::updateMaskOverlapWarning(QLabel * warning, QList<UIn
|
|||
// It'de nice if we could style this as a persistent red border around the line edit for any
|
||||
// overlapping masks. As it is editing the border undesirably modifies the arrow buttons.
|
||||
// This stylesheet will just highlight the currently selected line edit, which is fine enough.
|
||||
static const QString styleSheet = "QAbstractSpinBox { selection-background-color: rgba(255, 0, 0, 25%) }";
|
||||
static const QString errorStylesheet = QStringLiteral("QAbstractSpinBox { selection-background-color: rgba(255, 0, 0, 25%) }");
|
||||
static const QString defaultStylesheet = QStringLiteral("QAbstractSpinBox {}");
|
||||
|
||||
// Update warning display
|
||||
if (warning) warning->setHidden(overlapping.isEmpty());
|
||||
for (int i = 0; i < masks.length(); i++)
|
||||
masks.at(i)->setStyleSheet(overlapping.contains(i) ? styleSheet : "");
|
||||
masks.at(i)->setStyleSheet(overlapping.contains(i) ? errorStylesheet : defaultStylesheet);
|
||||
}
|
||||
|
||||
void ProjectSettingsEditor::updateBlockMaskOverlapWarning() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user