revert hideArrow() function, fix rme swap window

This commit is contained in:
garak 2019-04-29 18:24:35 -04:00 committed by huderlem
parent 0a4be71ae2
commit c189d2fac8
4 changed files with 3 additions and 15 deletions

View file

@ -10,7 +10,6 @@ class NoScrollComboBox : public QComboBox
public: public:
explicit NoScrollComboBox(QWidget *parent = nullptr); explicit NoScrollComboBox(QWidget *parent = nullptr);
void wheelEvent(QWheelEvent *event); void wheelEvent(QWheelEvent *event);
void hideArrow();
private: private:
}; };

View file

@ -1429,7 +1429,6 @@ void MainWindow::updateSelectedObjects() {
combo->addItems(*editor->project->mapNames); combo->addItems(*editor->project->mapNames);
combo->setToolTip("The destination map name of the warp."); combo->setToolTip("The destination map name of the warp.");
} else if (key == "destination_warp") { } else if (key == "destination_warp") {
combo->hideArrow();
combo->setToolTip("The warp id on the destination map."); combo->setToolTip("The warp id on the destination map.");
} else if (key == "item") { } else if (key == "item") {
if (!editor->project->itemNames->contains(value)) { if (!editor->project->itemNames->contains(value)) {
@ -1453,7 +1452,6 @@ void MainWindow::updateSelectedObjects() {
combo->setToolTip("The variable by which the script is triggered.\n" combo->setToolTip("The variable by which the script is triggered.\n"
"The script is triggered when this variable's value matches 'Var Value'."); "The script is triggered when this variable's value matches 'Var Value'.");
} else if (key == "script_var_value") { } else if (key == "script_var_value") {
combo->hideArrow();
combo->setToolTip("The variable's value which triggers the script."); combo->setToolTip("The variable's value which triggers the script.");
} else if (key == "movement_type") { } else if (key == "movement_type") {
if (!editor->project->movementTypes->contains(value)) { if (!editor->project->movementTypes->contains(value)) {
@ -1489,20 +1487,16 @@ void MainWindow::updateSelectedObjects() {
combo->setToolTip("The direction which the player must be facing\n" combo->setToolTip("The direction which the player must be facing\n"
"to be able to interact with this event."); "to be able to interact with this event.");
} else if (key == "radius_x") { } else if (key == "radius_x") {
combo->hideArrow();
combo->setToolTip("The maximum number of metatiles this object\n" combo->setToolTip("The maximum number of metatiles this object\n"
"is allowed to move left or right during its\n" "is allowed to move left or right during its\n"
"normal movement behavior actions."); "normal movement behavior actions.");
} else if (key == "radius_y") { } else if (key == "radius_y") {
combo->hideArrow();
combo->setToolTip("The maximum number of metatiles this object\n" combo->setToolTip("The maximum number of metatiles this object\n"
"is allowed to move up or down during its\n" "is allowed to move up or down during its\n"
"normal movement behavior actions."); "normal movement behavior actions.");
} else if (key == "script_label") { } else if (key == "script_label") {
combo->hideArrow();
combo->setToolTip("The script which is executed with this event."); combo->setToolTip("The script which is executed with this event.");
} else if (key == "sight_radius_tree_id") { } else if (key == "sight_radius_tree_id") {
combo->hideArrow();
combo->setToolTip("The maximum sight range of a trainer,\n" combo->setToolTip("The maximum sight range of a trainer,\n"
"OR the unique id of the berry tree."); "OR the unique id of the berry tree.");
} else { } else {

View file

@ -13,9 +13,3 @@ void NoScrollComboBox::wheelEvent(QWheelEvent *event)
if (hasFocus()) if (hasFocus())
QComboBox::wheelEvent(event); QComboBox::wheelEvent(event);
} }
void NoScrollComboBox::hideArrow()
{
this->setStyleSheet("QComboBox {border: 0 black;}"
"QComboBox::drop-down {border: 0px;}");
}

View file

@ -86,6 +86,7 @@ void RegionMapEditor::displayRegionMap() {
displayRegionMapLayoutOptions(); displayRegionMapLayoutOptions();
displayRegionMapEntriesImage(); displayRegionMapEntriesImage();
displayRegionMapEntryOptions(); displayRegionMapEntryOptions();
this->hasUnsavedChanges = false;
} }
void RegionMapEditor::displayRegionMapImage() { void RegionMapEditor::displayRegionMapImage() {
@ -497,7 +498,7 @@ void RegionMapEditor::on_tabWidget_Region_Map_currentChanged(int index) {
void RegionMapEditor::on_comboBox_RM_ConnectedMap_activated(const QString &mapsec) { void RegionMapEditor::on_comboBox_RM_ConnectedMap_activated(const QString &mapsec) {
this->ui->lineEdit_RM_MapName->setText(this->project->mapSecToMapHoverName->value(mapsec)); this->ui->lineEdit_RM_MapName->setText(this->project->mapSecToMapHoverName->value(mapsec));
this->hasUnsavedChanges = true;// sometimes this is called for unknown reasons //this->hasUnsavedChanges = true;// sometimes this is called for unknown reasons
} }
void RegionMapEditor::on_comboBox_RM_Entry_MapSection_activated(const QString &text) { void RegionMapEditor::on_comboBox_RM_Entry_MapSection_activated(const QString &text) {
@ -684,7 +685,7 @@ void RegionMapEditor::resize(int w, int h) {
void RegionMapEditor::on_action_Swap_triggered() { void RegionMapEditor::on_action_Swap_triggered() {
QDialog popup(this, Qt::WindowTitleHint | Qt::WindowCloseButtonHint); QDialog popup(this, Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
popup.setWindowTitle("New City Map"); popup.setWindowTitle("Swap Map Sections");
popup.setWindowModality(Qt::NonModal); popup.setWindowModality(Qt::NonModal);
QFormLayout form(&popup); QFormLayout form(&popup);