git-svn-id: svn://db.shs.com.ru/libs@381 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -104,6 +104,15 @@ Graphic * CDGraphics::viewportGraphic(QObject * o) const {
|
||||
}
|
||||
|
||||
|
||||
GDockWidget * CDGraphics::graphicDock(Graphic * o) const {
|
||||
if (!o) return 0;
|
||||
foreach (GDockWidget * d, docks)
|
||||
if (d->widget() == o)
|
||||
return d;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void CDGraphics::addGraphic() {
|
||||
Graphic * g = new Graphic();
|
||||
g->setGraphicsCount(0);
|
||||
@@ -133,7 +142,8 @@ void CDGraphics::removeGraphic() {
|
||||
|
||||
void CDGraphics::addXToGraphic(const QString & xp, Graphic * g) {
|
||||
qDebug() << "addGraphic" << xp << g;
|
||||
if (xp.isEmpty() || !g) return;
|
||||
GDockWidget * d = graphicDock(g);
|
||||
if (xp.isEmpty() || !g || !d) return;
|
||||
CDType & t(X[CDCore::stringToPath(Q2PIString(xp))]);
|
||||
int gind = g->graphicsCount();
|
||||
g->setGraphicsCount(gind + 1);
|
||||
|
||||
Reference in New Issue
Block a user