resMgr->integerValue( "VTKViewer", "speed_mode", vm->incrementalSpeedMode() ) );
vm->setSpacemouseButtons( resMgr->integerValue( "VTKViewer", "spacemouse_func1_btn", vm->spacemouseBtn(1) ),
resMgr->integerValue( "VTKViewer", "spacemouse_func2_btn", vm->spacemouseBtn(2) ),
- resMgr->integerValue( "VTKViewer", "spacemouse_func3_btn", vm->spacemouseBtn(3) ) );
+ resMgr->integerValue( "VTKViewer", "spacemouse_func5_btn", vm->spacemouseBtn(3) ) );
new LightApp_VTKSelector( vm, mySelMgr );
vm->connectToApplication(this);
}
"spacemouse_func2_btn" ); //increase_speed_increment
int spacemousePref3 = pref->addPreference( tr( "PREF_SPACEMOUSE_FUNC_3" ), vtkSM,
LightApp_Preferences::Selector, "VTKViewer",
- "spacemouse_func3_btn" ); //dominant_combined_switch
+ "spacemouse_func5_btn" ); //dominant_combined_switch
QStringList values;
values.append( tr( "PREF_SPACEMOUSE_BTN_1" ) );
#ifndef DISABLE_VTKVIEWER
if ( sec == QString( "VTKViewer" ) && (param == QString( "spacemouse_func1_btn" ) ||
param == QString( "spacemouse_func2_btn" ) ||
- param == QString( "spacemouse_func3_btn" ) ) )
+ param == QString( "spacemouse_func5_btn" ) ) )
{
int btn1 = resMgr->integerValue( "VTKViewer", "spacemouse_func1_btn", 1 );
int btn2 = resMgr->integerValue( "VTKViewer", "spacemouse_func2_btn", 2 );
- int btn3 = resMgr->integerValue( "VTKViewer", "spacemouse_func3_btn", 9 );
+ int btn3 = resMgr->integerValue( "VTKViewer", "spacemouse_func5_btn", 9 );
QList<SUIT_ViewManager*> lst;
#ifndef DISABLE_SALOMEOBJECT
viewManagers( SVTK_Viewer::Type(), lst );
void SVTK_MainWindow::onSwitchInteractionStyle(bool theOn)
{
if (theOn) {
- // keep the same style extensions
- SVTK_InteractorStyle* aStyle = (SVTK_InteractorStyle*)GetInteractorStyle();
- if ( aStyle ) {
- myKeyFreeInteractorStyle->SetControllerIncrement(aStyle->ControllerIncrement());
- myKeyFreeInteractorStyle->SetControllerOnKeyDown(aStyle->ControllerOnKeyDown());
+ // check if style is already set
+ if ( GetInteractorStyle() != myKeyFreeInteractorStyle.GetPointer() )
+ {
+ // keep the same style extensions
+ SVTK_InteractorStyle* aStyle = (SVTK_InteractorStyle*)GetInteractorStyle();
+ if ( aStyle ) {
+ myKeyFreeInteractorStyle->SetControllerIncrement(aStyle->ControllerIncrement());
+ myKeyFreeInteractorStyle->SetControllerOnKeyDown(aStyle->ControllerOnKeyDown());
+ }
+
+ PushInteractorStyle(myKeyFreeInteractorStyle.GetPointer());
}
-
- PushInteractorStyle(myKeyFreeInteractorStyle.GetPointer());
}
else {
PopInteractorStyle();
}
// update action state if method is called outside
- action(SwitchInteractionStyleId)->setChecked( theOn );
+ QtxAction* a = action( SwitchInteractionStyleId );
+ if ( a->isChecked() != theOn ) a->setChecked( theOn );
}
/*!
aViewWindow->setBackgroundColor( backgroundColor() );
aViewWindow->SetTrihedronSize( trihedronSize(), trihedronRelative() );
+ aViewWindow->SetProjectionMode( projectionMode() );
+ aViewWindow->SetInteractionStyle( interactionStyle() );
+ aViewWindow->SetIncrementalSpeed( incrementalSpeed(), incrementalSpeedMode() );
+ aViewWindow->SetSpacemouseButtons( spacemouseBtn(1), spacemouseBtn(2), spacemouseBtn(3) );
connect(aViewWindow, SIGNAL( actorAdded(VTKViewer_Actor*) ),
this, SLOT(onActorAdded(VTKViewer_Actor*)));