Skip to content

Commit d73c8f2

Browse files
committed
improve "move to area" to preselect current shown area in combobox
1 parent dceaf44 commit d73c8f2

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/T2DMap.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2904,7 +2904,7 @@ void T2DMap::mouseReleaseEvent(QMouseEvent* event)
29042904
//add our actions
29052905
QMapIterator<QString, QStringList> it2(mUserActions);
29062906
auto mapper = new QSignalMapper(popup);
2907-
2907+
29082908
while (it2.hasNext()) {
29092909
it2.next();
29102910
QStringList actionInfo = it2.value();
@@ -4265,6 +4265,8 @@ void T2DMap::slot_setArea()
42654265

42664266
set_room_area_dialog->show();
42674267
set_room_area_dialog->raise();
4268+
4269+
arealist_combobox->setCurrentIndex(mpMap->mpMapper->getCurrentShownAreaIndex());
42684270
}
42694271

42704272

src/dlgMapper.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ dlgMapper::dlgMapper( QWidget * parent, Host * pH, TMap * pM )
134134

135135
}
136136

137+
int dlgMapper::getCurrentShownAreaIndex()
138+
{
139+
return comboBox_showArea->currentIndex();
140+
}
141+
137142
void dlgMapper::updateAreaComboBox()
138143
{
139144
if (!mpMap) {

src/dlgMapper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class dlgMapper : public QWidget, public Ui::mapper
5353
// The button is the goto source for this bit of information:
5454
bool isIn3DMode() const { return pushButton_3D->isDown(); }
5555
bool isFloatAndDockable() const;
56+
int getCurrentShownAreaIndex();
5657

5758
public slots:
5859
void slot_toggleRoundRooms(const bool);

0 commit comments

Comments
 (0)