98{
99
100 SoSeparator::handleEvent(action);
101
103 return;
104
105 const SoEvent *
event =
action->getEvent();
106
107 SbBool haltaction =
FALSE;
108 if (SO_MOUSE_PRESS_EVENT(event, BUTTON1)) {
109 if (this->mouseDownPickPath) {
110 this->mouseDownPickPath->unref();
111 this->mouseDownPickPath = NULL;
112 }
113 const SoPickedPoint * pp =
action->getPickedPoint();
114 if (!pp)
116 if (pp) {
117 SoPath * selectionpath = pp->getPath();
118 if (!selectionpath)
119 return;
120
121 if (this->pickCBFunc && (!this->callPickCBOnlyIfSelectable ||
122 selectionpath->findNode(this) >= 0)) {
123 selectionpath = this->pickCBFunc(this->pickCBData, pp);
124 }
125
127
128 if (lastsoselectionfrompath==this) {
129
130 this->mouseDownPickPath = selectionpath;
131 this->mouseDownPickPath->ref();
133 }
134 }
135 }
136 else if (SO_MOUSE_RELEASE_EVENT(event, BUTTON1)) {
137
138 SbBool ignorepick =
FALSE;
139
140
142
143 if (
action->isHandled()) {
144
145
146 if (selpath) {
147 selpath->ref();
148 selpath->unref();
149 }
150 }
151 else {
152 if (haltaction)
action->setHandled();
153
154 if (!ignorepick) {
155 if (selpath) selpath->ref();
156 this->startCBList->invokeCallbacks(this);
157 this->invokeSelectionPolicy(selpath,
event->wasShiftDown());
158 this->finishCBList->invokeCallbacks(this);
159 if (selpath) selpath->unref();
160 }
161 }
162 if (this->mouseDownPickPath) {
163 this->mouseDownPickPath->unref();
164 this->mouseDownPickPath = NULL;
165 }
166 }
167}
SoPath * getSelectionPath(SoHandleEventAction *action, SbBool &ignorepick, SbBool &haltaction)
SoCooperativeSelection * getLastActiveSoSelectionFromPath(SoPath *) const