aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2020-03-06 01:14:05 +0300
committerCrystalwarrior <varsash@gmail.com>2020-03-06 01:14:05 +0300
commitee9de222ad9c1c4ebf2e6a1acc2cf5d2fc9dd77c (patch)
tree47edc960db05dcfe648833c11d865e6b813ade40 /src
parent39f9d1043e7f362275a189d71066ca642753f86f (diff)
Fix a bug where you couldn't join servers from your favorites list
Make column 0 the area index instead so that the areas take the full width of the treewidget
Diffstat (limited to 'src')
-rw-r--r--src/courtroom.cpp20
-rw-r--r--src/lobby.cpp2
2 files changed, 11 insertions, 11 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index ea6f1659..3b0d0f54 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -126,7 +126,7 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
ui_area_list = new QTreeWidget(this);
ui_area_list->setColumnCount(2);
- ui_area_list->hideColumn(1);
+ ui_area_list->hideColumn(0);
ui_area_list->setHeaderHidden(true);
ui_area_list->header()->setStretchLastSection(false);
ui_area_list->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
@@ -1295,8 +1295,8 @@ void Courtroom::list_areas()
if (i_area.toLower().contains(ui_music_search->text().toLower()))
{
QTreeWidgetItem *treeItem = new QTreeWidgetItem(ui_area_list);
- treeItem->setText(0, i_area);
- treeItem->setText(1, area_list.at(n_area));
+ treeItem->setText(0, area_list.at(n_area));
+ treeItem->setText(1, i_area);
if (ao_app->arup_enabled)
{
@@ -1304,25 +1304,25 @@ void Courtroom::list_areas()
treeItem->setBackground(0, free_brush);
if (arup_locks.at(n_area) == "LOCKED")
{
- treeItem->setBackground(0, locked_brush);
+ treeItem->setBackground(1, locked_brush);
}
else
{
if (arup_statuses.at(n_area) == "LOOKING-FOR-PLAYERS")
- treeItem->setBackground(0, lfp_brush);
+ treeItem->setBackground(1, lfp_brush);
else if (arup_statuses.at(n_area) == "CASING")
- treeItem->setBackground(0, casing_brush);
+ treeItem->setBackground(1, casing_brush);
else if (arup_statuses.at(n_area) == "RECESS")
- treeItem->setBackground(0, recess_brush);
+ treeItem->setBackground(1, recess_brush);
else if (arup_statuses.at(n_area) == "RP")
- treeItem->setBackground(0, rp_brush);
+ treeItem->setBackground(1, rp_brush);
else if (arup_statuses.at(n_area) == "GAMING")
- treeItem->setBackground(0, gaming_brush);
+ treeItem->setBackground(1, gaming_brush);
}
}
else
{
- treeItem->setBackground(0, free_brush);
+ treeItem->setBackground(1, free_brush);
}
++n_listed_areas;
diff --git a/src/lobby.cpp b/src/lobby.cpp
index 22033372..8c672456 100644
--- a/src/lobby.cpp
+++ b/src/lobby.cpp
@@ -456,7 +456,7 @@ void Lobby::list_favorites()
for (server_type i_server : ao_app->get_favorite_list())
{
QTreeWidgetItem *treeItem = new QTreeWidgetItem(ui_server_list);
- treeItem->setText(0, QString(i));
+ treeItem->setText(0, QString::number(i));
treeItem->setText(1, i_server.name);
// treeItem->setText(2, "-");
i++;