Author: sdzmitrovich
Date: 2009-06-08 14:22:53 -0400 (Mon, 08 Jun 2009)
New Revision: 15781
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4441,https://jira.jboss.org/jira...
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-06-08
17:59:19 UTC (rev 15780)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-06-08
18:22:53 UTC (rev 15781)
@@ -263,11 +263,12 @@
* - name of new style class
*/
public void addNewClass(String styleClassName) {
- getStyleComposite().clearStyleComposite();
- cssModel.updateCSSStyle(selectorLabel, getStyleAttributes());
- selectorLabel = cssModel.addCSSRule(styleClassName);
- preview.setSelector(selectorLabel);
- classCombo.add(selectorLabel);
+ // add new css class
+ String newSelectorLabel = cssModel.addCSSRule(styleClassName);
+ // add it to combobox
+ classCombo.add(newSelectorLabel);
+ // select new class, after it in handleSelectorSwitched() dialog will be
+ // updated
classCombo.select(classCombo.getItemCount() - 1);
}
@@ -373,6 +374,10 @@
classCombo.select(i);
}
+
+ if(classCombo.getSelectionIndex() == -1 ){
+ classCombo.select(0);
+ }
applyButton.setEnabled(false);