Fixed bogus empty lines in decoded window.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3085 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Edson W. R. Pereira 2013-03-24 18:01:22 +00:00
parent 389b4ac864
commit afc22d29fa
2 changed files with 20 additions and 8 deletions

View File

@ -1130,9 +1130,16 @@ void MainWindow::readFromStdout() //readFromStdout
if(t.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //Light red
//ui->decodedTextBrowser->setTextBackgroundColor(bg);
//t=t.mid(0,n-2) + " ";
ui->decodedTextBrowser->append("<table border=0 cellspacing=0 width=100%>"
"<tr><td bgcolor=\""+ bg + "\"><pre>"+ t + "</pre></td></tr>"
"</table>");
//ui->decodedTextBrowser->append(t);
QString s = "<table border=0 cellspacing=0 width=100%><tr><td bgcolor=\""+ bg + "\"><pre>" + t.replace("\n","") + "</pre></td></tr></table>";
QTextCursor cursor = ui->decodedTextBrowser->textCursor();
cursor.movePosition(QTextCursor::End);
QTextBlockFormat bf = cursor.blockFormat();
bf.setBackground(QBrush(QColor(bg)));
cursor.insertHtml(s);
ui->decodedTextBrowser->setTextCursor(cursor);
QString msg=t.mid(34,22);
bool b=stdmsg_(msg.toAscii().constData());
QStringList w=msg.split(" ",QString::SkipEmptyParts);
@ -1592,10 +1599,12 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl)
}
QString hiscall=t4.at(7);
QString hisgrid="";
if(t4.length()>=9) hisgrid=t4.at(8);
if(t4.length()>=9)
hisgrid=t4.at(8);
ui->dxCallEntry->setText(hiscall);
lookup();
if(ui->dxGridEntry->text()=="" and gridOK(hisgrid)) ui->dxGridEntry->setText(hisgrid);
if(ui->dxGridEntry->text()=="" and gridOK(hisgrid))
ui->dxGridEntry->setText(hisgrid);
int n = 60*t2.mid(0,2).toInt() + t2.mid(2,2).toInt();
int nmod=n%(m_TRperiod/30);
m_txFirst=(nmod!=0);

View File

@ -165,7 +165,7 @@
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Courier New'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
@ -174,6 +174,9 @@ p, li { white-space: pre-wrap; }
<property name="acceptRichText">
<bool>false</bool>
</property>
<property name="openLinks">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
@ -1527,8 +1530,8 @@ p, li { white-space: pre-wrap; }
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<property name="indent">
<number>4</number>
</property>
</widget>
</item>