improved scene element visibility buttons

coverity_scan^2
Marc Zinnschlag 9 years ago
parent 5c8756cb2c
commit 091e1bf25d

@ -11,7 +11,7 @@
#include "../../model/world/tablemimedata.hpp"
#include "../../model/world/idtable.hpp"
#include "../widget/scenetooltoggle.hpp"
#include "../widget/scenetooltoggle2.hpp"
#include "../widget/scenetoolmode.hpp"
#include "../widget/scenetooltoggle2.hpp"
@ -581,16 +581,15 @@ void CSVRender::PagedWorldspaceWidget::reset (unsigned int elementMask)
iter->second->reset (elementMask);
}
CSVWidget::SceneToolToggle *CSVRender::PagedWorldspaceWidget::makeControlVisibilitySelector (
CSVWidget::SceneToolToggle2 *CSVRender::PagedWorldspaceWidget::makeControlVisibilitySelector (
CSVWidget::SceneToolbar *parent)
{
mControlElements = new CSVWidget::SceneToolToggle (parent,
"Controls & Guides Visibility", ":placeholder");
mControlElements = new CSVWidget::SceneToolToggle2 (parent,
"Controls & Guides Visibility", ":scenetoolbar/scene-view-marker-c", ":scenetoolbar/scene-view-marker-");
mControlElements->addButton (":placeholder", Mask_CellMarker, ":placeholder",
"Cell marker");
mControlElements->addButton (":placeholder", Mask_CellArrow, ":placeholder", "Cell arrows");
mControlElements->addButton (":scenetoolbar/grid", Mask_CellBorder, ":scenetoolbar/grid-small", "Cell border");
mControlElements->addButton (1, Mask_CellMarker, "Cell Marker");
mControlElements->addButton (2, Mask_CellArrow, "Cell Arrows");
mControlElements->addButton (4, Mask_CellBorder, "Cell Border");
mControlElements->setSelectionMask (0xffffffff);

@ -11,6 +11,7 @@
namespace CSVWidget
{
class SceneToolToggle;
class SceneToolToggle2;
}
namespace CSVRender
@ -26,7 +27,7 @@ namespace CSVRender
CSMWorld::CellSelection mSelection;
std::map<CSMWorld::CellCoordinates, Cell *> mCells;
std::string mWorldspace;
CSVWidget::SceneToolToggle *mControlElements;
CSVWidget::SceneToolToggle2 *mControlElements;
bool mDisplayCellCoord;
private:
@ -90,7 +91,7 @@ namespace CSVRender
/// \attention The created tool is not added to the toolbar (via addTool). Doing
/// that is the responsibility of the calling function.
virtual CSVWidget::SceneToolToggle *makeControlVisibilitySelector (
virtual CSVWidget::SceneToolToggle2 *makeControlVisibilitySelector (
CSVWidget::SceneToolbar *parent);
virtual unsigned int getVisibilityMask() const;

@ -112,7 +112,7 @@ CSVWidget::SceneToolbar* CSVWorld::SceneSubView::makeToolbar (CSVRender::Worldsp
if (type==widget_Paged)
{
CSVWidget::SceneToolToggle *controlVisibilityTool =
CSVWidget::SceneToolToggle2 *controlVisibilityTool =
dynamic_cast<CSVRender::PagedWorldspaceWidget&> (*widget).
makeControlVisibilitySelector (toolbar);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

@ -80,8 +80,6 @@
<file alias="free-camera">flying eye.png</file>
<file alias="orbiting-camera">orbit2.png</file>
<file alias="play">scene-play.png</file>
<file alias="grid">grid-view.png</file>
<file alias="grid-small">grid-view-small.png</file>
<file alias="scene-view-1">scene-view-references.png</file>
<file alias="scene-view-16">scene-view-terrain.png</file>
<file alias="scene-view-4">scene-view-water.png</file>
@ -119,5 +117,16 @@
<file alias="scene-view-c29">scene-view-status-29.png</file>
<file alias="scene-view-c30">scene-view-status-30.png</file>
<file alias="scene-view-c31">scene-view-status-31.png</file>
<file alias="scene-view-marker-2">scene-exterior-arrows.png</file>
<file alias="scene-view-marker-4">scene-exterior-borders.png</file>
<file alias="scene-view-marker-1">scene-exterior-marker.png</file>
<file alias="scene-view-marker-c0">scene-exterior-status-0.png</file>
<file alias="scene-view-marker-c1">scene-exterior-status-1.png</file>
<file alias="scene-view-marker-c2">scene-exterior-status-2.png</file>
<file alias="scene-view-marker-c3">scene-exterior-status-3.png</file>
<file alias="scene-view-marker-c4">scene-exterior-status-4.png</file>
<file alias="scene-view-marker-c5">scene-exterior-status-5.png</file>
<file alias="scene-view-marker-c6">scene-exterior-status-6.png</file>
<file alias="scene-view-marker-c7">scene-exterior-status-7.png</file>
</qresource>
</RCC>

Loading…
Cancel
Save