Skip to content

Commit afe5d29

Browse files
committed
#4460 debug text cannot be scrolled
setText was being called repeatedly and was forcing scroll up. Also fixed a typo in floater_test_slapp.xml
1 parent 2c91aed commit afe5d29

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

indra/newview/llfloatersettingsdebug.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,14 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
207207
mSettingNameText->setToolTip(controlp->getName());
208208
mComment->setVisible(true);
209209

210-
std::string old_text = mComment->getText();
211210
std::string new_text = controlp->getComment();
212211
// Don't setText if not nessesary, it will reset scroll
213212
// This is a debug UI that reads from xml, there might
214213
// be use cases where comment changes, but not the name
215-
if (old_text != new_text)
214+
if (mOldText != new_text)
216215
{
217216
mComment->setText(controlp->getComment());
217+
mOldText = new_text;
218218
}
219219

220220
mValSpinner1->setMaxValue(F32_MAX);
@@ -467,6 +467,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
467467
}
468468
default:
469469
mComment->setText(std::string("unknown"));
470+
mOldText = "unknown";
470471
break;
471472
}
472473
}

indra/newview/llfloatersettingsdebug.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class LLFloaterSettingsDebug final
8282
LLColorSwatchCtrl* mColorSwatch = nullptr;
8383

8484
std::string mSearchFilter;
85+
std::string mOldText;
8586
};
8687

8788
#endif //LLFLOATERDEBUGSETTINGS_H

indra/newview/skins/default/xui/en/floater_test_slapp.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
width="500">
99
<floater.string
1010
name="remove_folder_slapp">
11-
secondlife://app/remove_folder/?folder_id=
11+
secondlife:///app/remove_folder/?folder_id=
1212
</floater.string>
1313
<text
1414
type="string"
@@ -42,7 +42,7 @@
4242
width="450"
4343
layout="topleft"
4444
left="16">
45-
secondlife://app/wear_folder/?folder_name=Daisy
45+
secondlife:///app/wear_folder/?folder_name=Daisy
4646
</text>
4747
<text
4848
type="string"
@@ -63,7 +63,7 @@
6363
width="450"
6464
layout="topleft"
6565
left="16">
66-
secondlife://app/add_folder/?folder_name=Cardboard%20Boxbot
66+
secondlife:///app/add_folder/?folder_name=Cardboard%20Boxbot
6767
</text>
6868
<text
6969
type="string"
@@ -73,7 +73,7 @@
7373
height="16"
7474
width="450"
7575
layout="topleft">
76-
secondlife://app/add_folder/?folder_id=59219db2-c260-87d3-213d-bb3bc298a3d8
76+
secondlife:///app/add_folder/?folder_id=59219db2-c260-87d3-213d-bb3bc298a3d8
7777
</text>
7878
<text
7979
type="string"
@@ -118,6 +118,6 @@
118118
name="remove_folder_txt"
119119
layout="topleft"
120120
left="16">
121-
secondlife://app/remove_folder/?folder_id=
121+
secondlife:///app/remove_folder/?folder_id=
122122
</text>
123123
</floater>

0 commit comments

Comments
 (0)