Disabled code that was trying to outsmart the painting mechanism. Added

code in SetSelection() to handle the case where the caller wants to clear
the selection.
This commit is contained in:
shawnp%earthling.net 1999-08-30 02:47:25 +00:00
Родитель 6e2ab0076d
Коммит 7311cdc9a1
1 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -122,7 +122,7 @@ NS_METHOD nsTextHelper::SetText(const nsString& aText, PRUint32& aActualSize)
QString string = buf;
mWidget->setUpdatesEnabled(PR_FALSE);
//mWidget->setUpdatesEnabled(PR_FALSE);
if (mWidget->isA("nsQLineEdit"))
{
((QLineEdit *)mWidget)->setText(string);
@ -131,7 +131,7 @@ NS_METHOD nsTextHelper::SetText(const nsString& aText, PRUint32& aActualSize)
{
((QMultiLineEdit *)mWidget)->setText(string);
}
mWidget->setUpdatesEnabled(PR_TRUE);
//mWidget->setUpdatesEnabled(PR_TRUE);
aActualSize = aText.Length();
delete[] buf;
@ -236,7 +236,14 @@ NS_METHOD nsTextHelper::SetSelection(PRUint32 aStartSel, PRUint32 aEndSel)
PR_LOG(QtWidgetsLM, PR_LOG_DEBUG, ("nsTextHelper::SetSelection()\n"));
if (mWidget->isA("nsQLineEdit"))
{
((QLineEdit *)mWidget)->setSelection(aStartSel, aEndSel - aStartSel);
if (aStartSel || aEndSel)
{
((QLineEdit *)mWidget)->setSelection(aStartSel, aEndSel - aStartSel);
}
else
{
((QLineEdit *)mWidget)->deselect();
}
}
else
{