| 163 | } |
| 164 | |
| 165 | bool MouseController::preMouseDown_( MouseButton btn, int mod ) |
| 166 | { |
| 167 | resetAllIfNeeded_(); |
| 168 | if ( !downState_.any() ) |
| 169 | downMousePos_ = currentMousePos_; |
| 170 | |
| 171 | // Click behavior is enabled only if it has listeners |
| 172 | if ( getViewerInstance().signals().mouseClickSignal.num_slots() > 0 ) |
| 173 | { |
| 174 | clickButton_ = btn; // Support click by one button only |
| 175 | // No pending button yet - so that camera operation starts only if mouseDown had not been handled by other tool |
| 176 | clickPendingDown_ = MouseButton::NoButton; |
| 177 | clickModifiers_ = mod; |
| 178 | clickTime_ = std::chrono::system_clock::now(); |
| 179 | } |
| 180 | if ( !dragActive_ && dragButton_ == MouseButton::NoButton ) |
| 181 | dragButton_ = btn; |
| 182 | |
| 183 | downState_.set( int( btn ) ); |
| 184 | return false; |
| 185 | } |
| 186 | |
| 187 | bool MouseController::mouseDown_( MouseButton btn, int mod ) |
| 188 | { |