Skip to content

Commit

Permalink
Modify code to reselect sub states with parent
Browse files Browse the repository at this point in the history
This solves #6.
  • Loading branch information
sudo-panda committed Aug 11, 2019
1 parent 3eef8dc commit d585894
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 173 deletions.
168 changes: 0 additions & 168 deletions src/visualstates/gui/dialogs/dupparamsdialog.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from ..tools.clickablelabel import ClickableLabel
from functools import partial

class ImportedParamsDialog(QDialog):
class ImportDialog(QDialog):
paramsChanged = pyqtSignal(list)

def __init__(self, name, file):
Expand Down Expand Up @@ -139,8 +139,7 @@ def setStateEnabled(self, stateUIs, state):
else:
UI.setEnabled(state)
if isinstance(UI, QCheckBox):
if not state:
UI.setChecked(state)
UI.setChecked(state)

def toggleView(self, widget):
label = self.sender()
Expand Down
4 changes: 2 additions & 2 deletions src/visualstates/gui/visualstates.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from .dialogs.namespacedialog import NamespaceDialog
from .dialogs.librariesdialog import LibrariesDialog
from .dialogs.rosconfigdialog import RosConfigDialog
from .dialogs.paramsdialog import ImportedParamsDialog
from .dialogs.importdialog import ImportDialog
from ..configs.rosconfig import RosConfig
from ..generators.cpprosgenerator import CppRosGenerator
from ..generators.pythonrosgenerator import PythonRosGenerator
Expand Down Expand Up @@ -267,7 +267,7 @@ def importFile(self, file):
for childState in file[0].getChildren():
childState.setInitial(False)

displayParamDialog = ImportedParamsDialog("Imported Parameters", file)
displayParamDialog = ImportDialog("Imported States and Parameters", file)
if displayParamDialog.exec_():
file = displayParamDialog.file
# Update importing Namespaces
Expand Down

0 comments on commit d585894

Please sign in to comment.