~ubuntu-branches/ubuntu/maverick/freecad/maverick

« back to all changes in this revision

Viewing changes to src/Gui/SoFCSelection.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adam C. Powell, IV
  • Date: 2010-01-11 08:48:33 UTC
  • mfrom: (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100111084833-4g9vgdqbkw8u34zb
Tags: 0.9.2646.5-1
* New upstream version (closes: #561696).
* Added swig to Build-Depends (closes: #563523, #563772).
* Removed python-opencv from Build-Depends and Recommends (closes: #560768).

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
        SoFCEnableSelectionAction *selaction = (SoFCEnableSelectionAction*)action;
164
164
        if (selaction->selection) {
165
165
            this->selectionMode = SoFCSelection::SEL_ON;
166
 
            this->style = SoFCSelection::EMISSIVE;
 
166
            // Could also be EMISSIVE_DIFFUSE
 
167
            //this->style = SoFCSelection::EMISSIVE;
167
168
        }
168
169
        else {
169
170
            this->selectionMode = SoFCSelection::SEL_OFF;
170
 
            this->style = SoFCSelection::BOX;
 
171
            //this->style = SoFCSelection::BOX;
171
172
            this->selected = NOTSELECTED;
172
173
        }
173
174
    }
204
205
                strcmp(selaction->SelChange.pDocName,"") == 0)
205
206
                selected = NOTSELECTED;
206
207
        }
 
208
        else if (selaction->SelChange.Type == SelectionChanges::SetSelection) {
 
209
            bool sel = Selection().isSelected(
 
210
                    documentName.getValue().getString(),
 
211
                    objectName.getValue().getString()/*,
 
212
                    subElementName.getValue().getString()*/);
 
213
            selected = (sel ? SELECTED : NOTSELECTED);
 
214
        }
207
215
    }
208
216
 
209
217
    inherited::doAction( action );