diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-08-09 19:37:23 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-08-09 19:37:23 +0000 |
commit | d1a392a0e95b10fe9603fbd379a70b4cc0ddf22f (patch) | |
tree | b1ce5452aa5578c7cbc5e711373d73b52b797510 /utils/themeeditor/models/parsetreemodel.cpp | |
parent | 77b682571f80b0aec9a16182600678a1b553a4bb (diff) | |
download | rockbox-d1a392a0e95b10fe9603fbd379a70b4cc0ddf22f.tar.gz rockbox-d1a392a0e95b10fe9603fbd379a70b4cc0ddf22f.zip |
Theme Editor: Co Used a more efficient/less error-prone system for rendering SBS documents underneath WPS documents
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27765 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/models/parsetreemodel.cpp')
-rw-r--r-- | utils/themeeditor/models/parsetreemodel.cpp | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/utils/themeeditor/models/parsetreemodel.cpp b/utils/themeeditor/models/parsetreemodel.cpp index fbedf10d45..a7f46acd5f 100644 --- a/utils/themeeditor/models/parsetreemodel.cpp +++ b/utils/themeeditor/models/parsetreemodel.cpp | |||
@@ -316,7 +316,7 @@ RBScene* ParseTreeModel::render(ProjectModel* project, | |||
316 | } | 316 | } |
317 | 317 | ||
318 | /* Rendering SBS, if necessary */ | 318 | /* Rendering SBS, if necessary */ |
319 | RBScreen* sbsScreen = 0; | 319 | RBScreen* screen = 0; |
320 | if(wps && device->data("rendersbs").toBool()) | 320 | if(wps && device->data("rendersbs").toBool()) |
321 | { | 321 | { |
322 | QString sbsFile = settings.value(remote ? "rsbs" : "sbs", ""); | 322 | QString sbsFile = settings.value(remote ? "rsbs" : "sbs", ""); |
@@ -334,49 +334,37 @@ RBScene* ParseTreeModel::render(ProjectModel* project, | |||
334 | if(sbsModel->root != 0) | 334 | if(sbsModel->root != 0) |
335 | { | 335 | { |
336 | RBRenderInfo sbsInfo(sbsModel, project, doc, &settings, device, | 336 | RBRenderInfo sbsInfo(sbsModel, project, doc, &settings, device, |
337 | sbsScreen); | 337 | screen); |
338 | 338 | ||
339 | sbsScreen = new RBScreen(sbsInfo, remote); | 339 | screen = new RBScreen(sbsInfo, remote); |
340 | scene->addItem(sbsScreen); | 340 | scene->addItem(screen); |
341 | 341 | ||
342 | sbsInfo = RBRenderInfo(sbsModel, project, doc, &settings, | 342 | sbsInfo = RBRenderInfo(sbsModel, project, doc, &settings, |
343 | device, sbsScreen); | 343 | device, screen); |
344 | sbsModel->root->render(sbsInfo); | 344 | sbsModel->root->render(sbsInfo); |
345 | screen->endSbsRender(); | ||
345 | 346 | ||
346 | setChildrenUnselectable(sbsScreen); | 347 | setChildrenUnselectable(screen); |
347 | } | 348 | } |
348 | } | 349 | } |
349 | } | 350 | } |
350 | 351 | ||
351 | RBScreen* screen = 0; | 352 | RBRenderInfo info(this, project, doc, &settings, device, screen); |
352 | RBRenderInfo info(this, project, doc, &settings, device, screen, sbsScreen); | ||
353 | 353 | ||
354 | /* Adding the screen */ | 354 | /* Adding the screen */ |
355 | if(sbsScreen) | 355 | if(!screen) |
356 | screen = new RBScreen(info, remote, sbsScreen->getCustomUI()); | 356 | { |
357 | else | ||
358 | screen = new RBScreen(info, remote); | 357 | screen = new RBScreen(info, remote); |
359 | |||
360 | if(!sbsScreen) | ||
361 | scene->addItem(screen); | 358 | scene->addItem(screen); |
359 | } | ||
362 | 360 | ||
363 | info = RBRenderInfo(this, project, doc, &settings, device, screen, | 361 | info = RBRenderInfo(this, project, doc, &settings, device, screen); |
364 | sbsScreen); | ||
365 | 362 | ||
366 | 363 | ||
367 | /* Rendering the tree */ | 364 | /* Rendering the tree */ |
368 | if(root) | 365 | if(root) |
369 | root->render(info); | 366 | root->render(info); |
370 | 367 | ||
371 | // /* Making sure the Custom UI Viewport can't be selected */ | ||
372 | // if(sbsScreen) | ||
373 | // { | ||
374 | // sbsScreen->getCustomUI()->setFlag(QGraphicsItem::ItemIsSelectable, | ||
375 | // false); | ||
376 | // sbsScreen->getCustomUI()->setFlag(QGraphicsItem::ItemIsMovable, | ||
377 | // false); | ||
378 | // } | ||
379 | // | ||
380 | return scene; | 368 | return scene; |
381 | } | 369 | } |
382 | 370 | ||