|
From: <dhu...@us...> - 2007-02-16 22:26:04
|
Revision: 338
http://svn.sourceforge.net/qcell/?rev=338&view=rev
Author: dhubleizh
Date: 2007-02-16 14:26:00 -0800 (Fri, 16 Feb 2007)
Log Message:
-----------
- anti FQT shit saving
- random colors for new symbols
Modified Paths:
--------------
trunk/qcell/basesources/simulationwindow.cpp
trunk/qcell/parsers/FQT/FQTParserPlugin.cpp
Modified: trunk/qcell/basesources/simulationwindow.cpp
===================================================================
--- trunk/qcell/basesources/simulationwindow.cpp 2007-02-16 22:20:54 UTC (rev 337)
+++ trunk/qcell/basesources/simulationwindow.cpp 2007-02-16 22:26:00 UTC (rev 338)
@@ -1056,6 +1056,7 @@
symbol.primitiveID = 0;
symbol.hide = 0;
int symbol_nr = renderer->getSymbolCount();
+ symbol.color = QColor(qrand() % 255, qrand() % 255, qrand() % 255);
if (symbol_nr < 10)
{
@@ -1070,10 +1071,10 @@
symbol.textSybmol = QChar((int)'a' + (symbol_nr - 10));
}
renderer->addSymbol(symbol);
- renderer->setSymbolColor(renderer->getSymbolCount()-1, QColor(255, 255, 255));
+ renderer->setSymbolColor(renderer->getSymbolCount()-1, symbol.color);
graphicsView2D->addSymbol(symbol);
- graphicsView2D->setSymbolColor(renderer->getSymbolCount()-1, QColor(255, 255, 255));
+ graphicsView2D->setSymbolColor(renderer->getSymbolCount()-1, symbol.color);
updateSymbolTable();
}
Modified: trunk/qcell/parsers/FQT/FQTParserPlugin.cpp
===================================================================
--- trunk/qcell/parsers/FQT/FQTParserPlugin.cpp 2007-02-16 22:20:54 UTC (rev 337)
+++ trunk/qcell/parsers/FQT/FQTParserPlugin.cpp 2007-02-16 22:26:00 UTC (rev 338)
@@ -320,7 +320,7 @@
lf.fromXmlString(&content);
// Check if we can use the generic type from the XML string
- if(!lf.fromXmlString(&content));
+ if(!lf.fromXmlString(&content))
{
qDebug(tr("Unable to parse out internal data!").toAscii());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|